#-------------------------------------------------------------------------------
#  [1] Homebrew initialization:
#
#      The four packages 1) Qt6, 2) Ruby, 3) Python, and 4) libgit2 are required.
#      A typical installation flow is shown below.
#-------------------------------------------------------------------------------
   $ brew install qt@6
   $ brew install ruby@3.3
   $ brew install python@3.11
   $ brew install libgit2

#-------------------------------------------------------------------------------
#  [2] Installation process of different Python modules using 'pip':
#
#       MacBookPro2{kazzz-s} klayout (1)% brew info python@3.11
#
#       ==> python@3.11: stable 3.11.6 (bottled)
#       Interpreted, interactive, object-oriented programming language
#       https://www.python.org/
#       /usr/local/Cellar/python@3.11/3.11.6 (3,314 files, 62.5MB) *
#         Poured from bottle using the formulae.brew.sh API on 2023-10-13 at 18:58:15
#       From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/python@3.11.rb
#       License: Python-2.0
#       ==> Dependencies
#       Build: pkg-config ✔
#       Required: mpdecimal ✔, openssl@3 ✔, sqlite ✔, xz ✔
#       ==> Caveats
#       Python has been installed as
#         /usr/local/bin/python3
#
#  ==>  Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
#  ==>  `python3`, `python3-config`, `pip3` etc., respectively, have been installed into
#  ==>    /usr/local/opt/python@3.11/libexec/bin
#
#       You can install Python packages with
#         pip3 install <package>
#       They will install into the site-package directory
#         /usr/local/lib/python3.11/site-packages
#
#       tkinter is no longer included with this formula, but it is available separately:
#         brew install python-tk@3.11
#
#       gdbm (`dbm.gnu`) is no longer included in this formula, but it is available separately:
#         brew install python-gdbm@3.11
#       `dbm.ndbm` changed database backends in Homebrew Python 3.11.
#       If you need to read a database from a previous Homebrew Python created via `dbm.ndbm`,
#       you'll need to read your database using the older version of Homebrew Python and convert to another format.
#       `dbm` still defaults to `dbm.gnu` when it is installed.
#
#       For more information about Homebrew and Python, see: https://docs.brew.sh/Homebrew-and-Python
#       ==> Analytics
#       install: 288,062 (30 days), 797,087 (90 days), 1,823,865 (365 days)
#       install-on-request: 160,736 (30 days), 448,718 (90 days), 929,308 (365 days)
#       build-error: 326 (30 days)
#-------------------------------------------------------------------------------
MacBookPro2{kazzz-s} ~ (1)% cd /usr/local/opt/python@3.11/bin

MacBookPro2{kazzz-s} bin (2)% ./pip3.11 list <=== (beginning)
Package    Version
---------- -------
pip        23.3.1
setuptools 68.2.2
wheel      0.41.2


MacBookPro2{kazzz-s} bin (3)% ./pip3.11 install pandas scipy matplotlib
:
:
:
MacBookPro2{kazzz-s} bin (4)% ./pip3.11 list
Package           Version
----------------- ------------
contourpy         1.1.1
cycler            0.12.1
delocate          0.10.4
fonttools         4.43.1
kiwisolver        1.4.5
klayout           0.28.12
matplotlib        3.8.0
numpy             1.26.1
packaging         23.2
pandas            2.1.1
Pillow            10.1.0
pip               23.3.1
pyparsing         3.1.1
python-dateutil   2.8.2
pytz              2023.3.post1
scipy             1.11.3
setuptools        68.2.2
six               1.16.0
typing_extensions 4.8.0
tzdata            2023.3
wheel             0.41.2

#-------------------------------------------------------------------------------
#  [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
#------------------
