简体   繁体   English

从命令提示符处运行ABAQUS python脚本时中断

[英]Disruption in running ABAQUS python script from command prompt

I am having problem running an ABAQUS python script from DOS prompt after installing VPython. 安装VPython后,在DOS提示符下运行ABAQUS python脚本时遇到问题。 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): 我通常在DOS提示符下键入以下命令以执行不带图形单元界面(GUI)的python脚本:

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. 我正在使用ABAQUS 6.10。 Can somebody help me to get the settings, right? 有人可以帮我获得设置吗?

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. 并非由于用户的错误而导致的某些更改,对于此特定问题,对于其他安装的程序(例如ABAQUS)可能是不希望的。 In this problem, after the installation of VPython (for some other purpose) the system variables under the variable name "PATH" got changed. 在这个问题中,在安装VPython(出于某些其他目的)之后,更改了变量名“ PATH”下的系统变量。 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: 从MS-DOS提示符下,使用ABAQUS调用python脚本(使用命令abaqus cae noGUI=<script-file-name>.py )时,这导致以下错误:

'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. 因此,需要重新输入ABAQUS程序的变量值。 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 ". 在“ 系统变量 ”列表下,单击并编辑名称为“ PATH ”的变量。
  5. In the input box, in the " Variable Value " add the following: D:\\SIMULIA\\Abaqus\\Commands; 在输入框中,在“ 变量值 ”中添加以下内容: 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. 请注意,“命令”的扩展名可能会在不同计算机上有所不同,具体取决于ABAQUS安装的目标文件夹。 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 " 您也可以在dos提示符下输入echo %PATH%并检查以查看变量名“ PATH ”下是否存在“ Variable Value ”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM