0

I am having problem running an ABAQUS python script from DOS prompt after installing VPython. It seems the system and environment variables have been disrupted. I usually type the following command in DOS prompt to execute the python script without the graphical unit interface (GUI):

abaqus cae noGUI=myFile.py 

I am attaching a figure containing the following error message:

Error Message

'abaqus' is not recognized as an internal or external command.<br>
operable program or batch file.

I am using ABAQUS 6.10. Can somebody help me to get the settings, right?

naseefo
  • 720
  • 1
  • 9
  • 30
  • If I recall correctly, Abaqus ships with his own Python interpreter & environnment. You should try to install the VPython package inside abaqus's python env, instead of trying to use abaqus's lib from you std python env. This is from 5 years ago, when they had 2.6 on abaqus and it was causing al sorts of pain. maybe things got better – Félix Cantournet Mar 19 '15 at 15:58
  • Thanks for the reply Felix. I am using ABAQUS 6.10 and the python environment is already there inside it. However, I am trying to run a python script externally from DOS prompt. – naseefo Mar 19 '15 at 16:12
  • That is my point. from you dos prompt when you call "python myscript.py" does it use the python env of abaqus or the one you installed to get VPython. ? – Félix Cantournet Mar 19 '15 at 16:20
  • Could you give the command you type in the dos prompt and the actual error message you get. – Félix Cantournet Mar 19 '15 at 16:21
  • In the dos prompt I am typing the following command: abaqus cae noGUI=myFile.py. I have mentioned this in the problem description. I get the following error message: 'abaqus' is not recognized as an internal or external command. operable program or batch file. – naseefo Mar 19 '15 at 16:35
  • Can just open Abaqus (CAE or Viewer)? If that doesn't work either, maybe your PATH system variable got messed up. – hgazibara Mar 19 '15 at 16:38
  • Can you in that same prompt get the result of `echo %PATH%` – Félix Cantournet Mar 19 '15 at 16:40
  • Yeah... That's what I thought. Then environment variables must have go mixed up. After executing the command echo %PATH% I am getting the following answer: C:\Python27\; D:\Program Files (x86)\Mendeley Desktop\wordPlugin – naseefo Mar 19 '15 at 18:15

1 Answers1

1

I thank everyone for their participation. After the brief discussions, the problem has been solved using the procedure explained in detail in the following paragraphs.

On installation of some programs the system variables may get changed. Some changes, not due to the fault of the user, may be undesirable for other installed programs, like ABAQUS, as in this particular problem. In this problem, after the installation of VPython (for some other purpose) the system variables under the variable name "PATH" got changed. This caused the following error while calling the python script with ABAQUS (using the command abaqus cae noGUI=<script-file-name>.py) from the MS-DOS prompt:

'abaqus' is not recognized as an internal or external command.
operable program or batch file.

Therefore, the variable values for ABAQUS program needed to be re-entered. The following steps were taken:

  1. Right-click "My Computer" and click on "Properties".
  2. On the left-hand side of the task pane, click on "Advanced System Settings".
  3. Under the "Advanced" tab, at the bottom, click on "Environment Variables".
  4. Under the list of "System Variables", click and edit the variable with name "PATH".
  5. In the input box, in the "Variable Value" add the following: D:\SIMULIA\Abaqus\Commands; (Ensure that the written value is preceded and followed by a semi-colon if there are already other values existing in the "Variable Value" box)

Please note the extension to the "Commands" can vary in different computers depending on the destination folder of ABAQUS installation. So one must be cautious in entering the exact folder path. You can also enter echo %PATH% in the dos prompt and check to see the "Variable Value" present under the variable name "PATH"

naseefo
  • 720
  • 1
  • 9
  • 30