Abaqus python through command line: Error message "ImportError: No module named ******"
Abaqus python through command line: Error message "ImportError: No module named ******"
(OP)
Hi everyone,
I'm trying to run Abaqus through a command line with abaqus python d:\file.py. However, I receive the following error message:
file.py looks as follows (and I receive the same error for all of the Abaqus-modules I want to import; it works for other, standard modules):
Unfortunately, I couldn't find any solution online and would really appreciate your help. Thank you very much!
I'm trying to run Abaqus through a command line with abaqus python d:\file.py. However, I receive the following error message:
CODE --> Python
Traceback (most recent call last): File "file.py", line 1, in <module> from part import * File "SMAPython\SMAPytLibPy.m\src\site.py", line 120, in _numpyHook """Append ./build/lib.<platform> in case we're running in the build dir ImportError: No module named part
file.py looks as follows (and I receive the same error for all of the Abaqus-modules I want to import; it works for other, standard modules):
CODE --> Python
from part import * from material import * from section import * from assembly import * from step import * from interaction import * from load import * ...
Unfortunately, I couldn't find any solution online and would really appreciate your help. Thank you very much!





RE: Abaqus python through command line: Error message "ImportError: No module named ******"
If you need that, you may run the script through CAE but without starting the GUI. Should be something like that:
abaqus cae noGui=file.py
RE: Abaqus python through command line: Error message "ImportError: No module named ******"
Another quick question: When I have the batch file, e.g. run.bat, with content abaqus cae noGui=file.py in the same directory like the file.py, it can't find it ("abaqus error: the following file(s) could not be located: file.py"). It only works if I specify the directory, like in: abaqus cae noGui=C:\file.py. Is there a way to set it to the same location the batch file is in?
Thanks a lot!
RE: Abaqus python through command line: Error message "ImportError: No module named ******"
set WORKING_DIRECTORY=%cd%
RE: Abaqus python through command line: Error message "ImportError: No module named ******"
CODE -->