#-------------------------------------------------------------------------------
#  [1] MacPorts initialization:
#
#      The four packages 1) Qt5, 2) Ruby, 3) Python, and 4) libgit2 are required.
#      A typical installation flow is shown below.
#-------------------------------------------------------------------------------
   $ sudo port install coreutils
   $ sudo port install findutils
   $ sudo port install qt5
   $ sudo port install ruby32
   $ sudo port install python311
   $ sudo port install py311-pip
   $ sudo port install libgit2

   $ sudo port select --set python3 python311
   $ sudo port select --set python  python311
   $ sudo port select --set pip3    pip311
   $ sudo port select --set pip     pip311

#-------------------------------------------------------------------------------
#  [2] Installation process of different Python modules using 'pip-3.11':
#-------------------------------------------------------------------------------
MacBookPro2{kazzz-s} ~ (1)% which pip3
/opt/local/bin/pip3

MacBookPro2{kazzz-s} ~ (2)% pip3 --version
pip 23.3.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip (python 3.11)

MacBookPro2{kazzz-s} ~ (3)% sudo pip3 list
:
Package    Version
---------- -------
pip        23.3.1
setuptools 68.2.2

MacBookPro2{kazzz-s} ~ (4)% sudo pip3 install wheel pandas scipy matplotlib
:
:
:

MacBookPro2{kazzz-s} ~ (5)% pip3 list --outdated
:
: update outdated modules if any
:

MacBookPro2{kazzz-s} ~ (6)% pip3 list
Package         Version
--------------- ------------
anytree         2.11.1
build           1.0.3
contourpy       1.1.1
cycler          0.12.1
Cython          3.0.4
docutils        0.20.1
fonttools       4.43.1
gi-docgen       2023.1
html5lib        1.1
installer       0.7.0
Jinja2          3.1.2
kiwisolver      1.4.5
libxml2-python  2.11.5
lxml            4.9.3
Mako            1.2.4
Markdown        3.5
MarkupSafe      2.1.3
matplotlib      3.8.0
meson           1.2.3
numpy           1.26.1
packaging       23.2
pandas          2.1.1
Pillow          10.1.0
pip             23.3.1
pip-review      1.3.0
Pygments        2.16.1
pyparsing       3.1.1
pyproject_hooks 1.0.0
python-dateutil 2.8.2
pytz            2023.3.post1
PyYAML          6.0.1
roman           4.1
scipy           1.11.3
setuptools      68.2.2
six             1.16.0
smartypants     2.0.1
toml            0.10.2
typogrify       2.0.7
tzdata          2023.3
webencodings    0.5.1
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.11  0.993552

[1810 rows x 3 columns]

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