How do i run python file from cmd?
How do i run python file from cmd?
(OP)
Hello,
i have a script that accesses the odb and gets some data from it. if i try to run it in abaqus (execfile()) it runs just fine, but if i run it from the cmd prompt, i get an error that there is no module by name odbAccess.
any idea how can i make it work? i've got no way of editing the path information (linux), so that won't do. Would the executeOnCaeStartup() function be of any use (that's IF i can access it)? i have the #!/usr/bin/python in the beginning of the file, yes.
any other ideas?
i have a script that accesses the odb and gets some data from it. if i try to run it in abaqus (execfile()) it runs just fine, but if i run it from the cmd prompt, i get an error that there is no module by name odbAccess.
any idea how can i make it work? i've got no way of editing the path information (linux), so that won't do. Would the executeOnCaeStartup() function be of any use (that's IF i can access it)? i have the #!/usr/bin/python in the beginning of the file, yes.
any other ideas?





RE: How do i run python file from cmd?
To run a script with modules delivered by Simulia (e.g. odbAccess) you need to run python which is installing with Abaqus.
With "#!/usr/bin/python" line you are try to run python delivered with operating system.
Please try command:
abaqus python script_filename.py
Regards,
akaBarten
RE: How do i run python file from cmd?
to what do i reference it? to Commands directory or /6.9-1/Python? (since abaqus python is technically run from the Commands directory, at least on winse).