Issues Importing Gams 24.8.5 From Python 3.6.10

Solver related questions
Post Reply
AlbertoGil
User
User
Posts: 1
Joined: 1 month ago

Issues Importing Gams 24.8.5 From Python 3.6.10

Post by AlbertoGil » 1 month ago

Hello all, thank you in advance for the help,

It previously worked fine, importing GAMS from my python code. I had to update my python from 2.7.15 to 3.6.10 version. Now I got this error:
image.png
If you can not view the image, it says the following:
----------------------------------------------------------------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\alberto.gil\Anaconda3\envs\optimizador\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\alberto.gil\Anaconda3\envs\optimizador\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\alberto.gil\AppData\Roaming\Python\Python36\site-packages\turbybomb\resultados_opt.py", line 3, in <module>
from gams import *
File "C:\Users\alberto.gil\Anaconda3\envs\optimizador\lib\site-packages\gams\__init__.py", line 8, in <module>
from .workspace import *
ImportError: DLL load failed: The specified module could not be found.
----------------------------------------------------------------------------------------------------------------------------------------------------------

I am using GAMS 24.8.5 version. I have the license file in the same directory as previously. And I have installed the GAMS library 1.0 on my conda environment as follow:
- cd C:\GAMS\win64\24.8\apifiles\Python
- cd api_36 && python setup.py install && cd ..

When I ran it I got the error that I have previously shared.

Could you help me please?

Post Reply