#-------------------------------------------------------------------------------
#  [1] Homebrew initialization:
#
#      The three packages 1) Qt5, 2) Ruby, and 3) Python are required.
#      A typical installation flow is shown below.
#-------------------------------------------------------------------------------
   % brew install qt@5
   % brew install ruby@3.1
   % brew install python@3.9

#-------------------------------------------------------------------------------
#  [2] Installation process of different Python modules using 'pip':
#
#       MacBookPro2{kazzz-s} klayout (1)% brew info python@3.9
#
#       ==> python@3.9: stable 3.9.16 (bottled)
#       Interpreted, interactive, object-oriented programming language
#       https://www.python.org/
#       /usr/local/Cellar/python@3.9/3.9.16 (3,094 files, 55.8MB) *
#         Poured from bottle on 2022-12-10 at 08:07:27
#       From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/python@3.9.rb
#       License: Python-2.0
#       ==> Dependencies
#       Build: pkg-config ✔
#       Required: gdbm ✔, mpdecimal ✔, openssl@1.1 ✔, readline ✔, sqlite ✔, xz ✔
#       ==> Caveats
#       Python has been installed as
#         /usr/local/bin/python3.9
#
#  ==>  Unversioned and major-versioned symlinks `python`, `python3`, `python-config`, `python3-config`,\
#          `pip`, `pip3`, etc. pointing to
#  ==>  `python3.9`, `python3.9-config`, `pip3.9` etc., respectively, have been installed into
#  ==>    /usr/local/opt/python@3.9/libexec/bin
#
#       You can install Python packages with
#         pip3.9 install <package>
#       They will install into the site-package directory
#         /usr/local/lib/python3.9/site-packages
#
#       tkinter is no longer included with this formula, but it is available separately:
#         brew install python-tk@3.9
#
#       If you do not need a specific version of Python, and always want Homebrew's `python3` in your PATH:
#         brew install python3
#
#       See: https://docs.brew.sh/Homebrew-and-Python
#       ==> Analytics
#       install: 318,097 (30 days), 1,052,656 (90 days), 6,331,519 (365 days)
#       install-on-request: 248,079 (30 days), 848,581 (90 days), 4,130,401 (365 days)
#       build-error: 89 (30 days)
#-------------------------------------------------------------------------------
MacBookPro2{kazzz-s} ~ (1)% cd /usr/local/opt/python@3.9/bin

MacBookPro2{kazzz-s} bin (2)% ./pip3.9 list <=== (very beginning)
Package    Version
---------- -------
pip        22.3.1
setuptools 65.6.3
wheel      0.38.4


MacBookPro2{kazzz-s} bin (3)% ./pip3.9 install pandas scipy matplotlib
:
:
:
MacBookPro2{kazzz-s} bin (4)% ./pip3.9 list
Package         Version
--------------- -------
contourpy       1.0.6
cycler          0.11.0
fonttools       4.38.0
kiwisolver      1.4.4
matplotlib      3.6.2
numpy           1.24.1
packaging       22.0
pandas          1.5.2
Pillow          9.3.0
pip             22.3.1
pyparsing       3.0.9
python-dateutil 2.8.2
pytz            2022.7
scipy           1.9.3
setuptools      65.6.3
six             1.16.0
wheel           0.38.4

#-------------------------------------------------------------------------------
#  [3] Python module import test:
#
#      Run this sample python from "Macro Development" with such a sample CSV.
#-------------------------------------------------------------------------------
'''
# Enter your Python code here
import os
import numpy as np
import scipy
import matplotlib
import pandas as pd

sampleCSV = os.environ["HOME"] + "/KLayout/sampleCSV.csv"
df = pd.read_csv( sampleCSV, comment='#' )
print(df)
'''

== Output ==
      X[mm]  Y[mm]   Ratio[]
0       0.0    3.1  1.006617
1       2.7   -1.5  1.006607
2      -2.7   -1.5  1.006321
3       0.0    9.2  1.006651
4       5.9    7.0  1.006211
...     ...    ...       ...
1805  -30.3  140.7  0.994904
1806  -24.3  141.9  0.994266
1807  -18.3  142.8  0.994888
1808  -12.2  143.4  0.994146
1809   -6.1  143.8  0.993552

[1810 rows x 3 columns]

#------------------
# End of File
#------------------
