Dear all,
I try to install the GAMS python API under GAMS version 38.2.1 on Windows10 system. Using the setup.py command seems to work. However, trying to import gamstransfer I receive an error message:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import gamstransfer as gt
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu\lib\site-packages\gamstransfer-0.1-py3.9.egg\gamstransfer.py:32, in <module>
30 import warnings
31 import copy
---> 32 import gams2numpy
33 from gdxcc import *
34 from gmdcc import *
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu\lib\site-packages\gams2numpy-0.1-py3.9.egg\gams2numpy.py:26, in <module>
1 #
2 # GAMS - General Algebraic Modeling System Python API
3 #
(...)
23 # SOFTWARE.
24 #
---> 26 import _gams2numpy
27 from gdxcc import *
28 from gmdcc import *
ModuleNotFoundError: No module named '_gams2numpy'
Likewise when I try to import the gams module:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 import gams
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu38\lib\site-packages\gams-1.0-py3.8.egg\gams\__init__.py:32, in <module>
1 #
2 # GAMS - General Algebraic Modeling System Python API
3 #
(...)
24 #
25 # This file was generated.
27 __all__ = ["DebugLevel", "GMS_MAX_INDEX_DIM", "SV_UNDEF", "SV_EPS", "GamsCheckpoint", "GamsDatabase", "GamsJob", "UpdateAction", "SymbolUpdateType", "GamsModifier", "GamsModelInstanceOpt", "GamsModelInstance", "Action", "CharSet", "GamsOptions", \
28 "GamsEquationRecord", "GamsParameterRecord", "GamsSetRecord", "GamsVariableRecord", "GamsVariable", "GamsParameter", "GamsSet", "GamsEquation", "EquType", "VarType", "SolveStat", \
29 "ModelStat", "GamsWorkspace", "GamsException", "GamsExceptionExecution", "GamsExitCode", \
30 "PageContr", "Action", "LogLine", "AppendOut", "StepSum", "Suppress", "DFormat", "TFormat", "IntVarUp", "Case", "DumpParms", "ForceWork", "DumpOpt", "ErrMsg", "StringChk", "CharSet", "Keep", "TraceOpt", "SysOut", "SolPrint", "HoldFixed", "On115", "ExecMode", "InteractiveSolver", "FileCase", "SavePoint", "SolveLink", "Sys10", "Sys11", "ZeroResRep", "gdxCompress", "gdxConvert", "AppendExpand", "NoNewVarEqu", "gdxUels", "strictSingleton", "FDOpt", "PrefixLoadPath", "AsyncSolLst", "PyMultInst", "ShowOSMemory", "LstTitleLeftAligned", "FreeEmbeddedPython", "CaptureModelInstance", "CheckErrorLevel", "SuffixDLVars", "Digit", "Empty", "Filtered", "Listing", "PutNR", "PreviousWork", "HoldFixedAsync", "ReferenceLineNo", "ProcTreeMemMonitor" ]
---> 32 from .workspace import *
33 from .database import *
34 from .options import *
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu38\lib\site-packages\gams-1.0-py3.8.egg\gams\workspace.py:32, in <module>
30 from subprocess import Popen
31 import threading
---> 32 from .database import *
33 from .execution import *
34 from .options import *
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu38\lib\site-packages\gams-1.0-py3.8.egg\gams\database.py:26, in <module>
1 #
2 # GAMS - General Algebraic Modeling System Python API
3 #
(...)
23 # SOFTWARE.
24 #
---> 26 from gdxcc import *
27 from gmdcc import *
28 import os
File <frozen zipimport>:259, in load_module(self, fullname)
File ~\miniconda3\envs\gamsNeu38\lib\site-packages\gams2numpy-0.1-py3.8.egg\gdxcc.py:11, in <module>
8 if _swig_python_version_info < (2, 7, 0):
9 raise RuntimeError("Python 2.7 or later required")
---> 11 import _gdxcc
13 try:
14 import builtins as __builtin__
ModuleNotFoundError: No module named '_gdxcc'
I tried this in Conda environments using python version 3.8 and 3.9. But the error occurs for both versions.
Do I miss something? Any hints are more than welcome.
Best
Jan