Dear Reader,
Hope you are well in these tough times.
I have recently upgraded to Trelis 17.0 from Trelis 16.5.4.
Earlier with Trelis 16.5.4, it was possible to use Trelis and the Cubit library from a Python environment with the following code (a .py script file with the Trelis code was executed in the Python Environment)-
import sys
sys.path.append('C:/Program Files/Trelis 16.5.4/bin/')
sys.path.append('C:/Program Files/Trelis 16.5.4/bin/Lib/')
import cubit
cubit.init([''])
cubit.cmd...........
However, since updating to Trelis 17.0, this has stopped working. of course, the path in the code above has been edited to -
sys.path.append('C:/Program Files/Trelis 17.0/bin/')
sys.path.append('C:/Program Files/Trelis 17.0/bin/Lib/')
But it still doesnât seem to work. Could you please help? Below is the error -
import cubit
File "C:/Program Files/Trelis 17.0/bin/cubit.py", line 20, in <module>
from cubit2 import *
File "C:/Program Files/Trelis 17.0/bin/cubit2.py", line 21, in <module>
_cubit2 = swig_import_helper()
File "C:/Program Files/Trelis 17.0/bin/cubit2.py", line 20, in swig_import_helper
return importlib.import_module('_cubit2')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
ImportError: DLL load failed: The specified module could not be found.
Also, please note that the above code works when it is opened and executed inside the Trelis 17.0 GUI environment.
Also, I saw in a post that Trelis 17.0 now has support for both Python 2 and Python 3. Is this correct? I ask because the command -
print(sys.version)
- still shows 2.7.10.
Thank you.
Besh wishes,
Somsubhro