Trouble installing python API

I installed the python API. but when I execute

python3 transport1.py

, I get the following error.

Copy ASCII : trnsport.gms
Traceback (most recent call last):
File “/Library/Frameworks/GAMS.framework/Versions/45/Resources/apifiles/Python/transport1.py”, line 24, in
t1.run()
File “/Users/tanvirkaisar/opt/anaconda3/envs/test/lib/python3.10/site-packages/gams/control/execution.py”, line 986, in run
tmp_cp, tmp_opt, pf_file_name, _ = self._prepare_run(
File “/Users/tanvirkaisar/opt/anaconda3/envs/test/lib/python3.10/site-packages/gams/control/execution.py”, line 884, in _prepare_run
tmp_opt = GamsOptions(self._workspace, gams_options)
File “/Users/tanvirkaisar/opt/anaconda3/envs/test/lib/python3.10/site-packages/gams/control/options.py”, line 2333, in init
raise gams.control.workspace.GamsException(ret[1])
gams.control.workspace.GamsException: Could not load shared library /Library/Frameworks/GAMS.framework/Versions/45/Resources/liboptdclib64.dylib: dlopen(/Library/Frameworks/GAMS.framework/Versions/45/Resources/liboptdclib64.dylib, 0x0002): tried: '/Library/Frameworks/GAMS.framework/Versions/4
zsh: segmentation fault python3 transport1.py

I checked that the library that is not being loaded exists in the directory

Hi,

Chances are that the build architecture of your Python version and the GAMS installation do not match. There are notes on this in the documentation: https://www.gams.com/latest/docs/API_PY_GETTING_STARTED.html#PY_APPLE_ARM
You might want to run both commands that are mentioned there in order to check if you are running compatible versions:

gams audit



python -c "import platform; print(platform.processor())"

Best,
Clemens