简体   繁体   English

pythonpath和omniORB

[英]pythonpath and omniORB

In README file of omniORBpy-3.4 is written that I have to set PYTHONPATH as 在omniORBpy-3.4的README文件中,我必须将PYTHONPATH设置为

set PYTHONPATH=%PYTHONPATH%;%TOP%\lib\python;%TOP%\lib\x86_win32

Where %TOP% is the top-level omniORBpy directory. 其中%TOP%是顶级omniORBpy目录。 (Windows machine) (Windows机器)

I have done that and reboot my machine but when I try to run *.py files which have a line like 我已经完成并重新启动了机器,但是当我尝试运行* .py文件时,该文件的行如下

import omniORB 

it gives me an error that no such module omniORB. 这给了我一个错误,那就是没有这样的模块omniORB。 What I should do? 我该做什么?

我认为您会发现omniORBpy的README文件指出TOP必须设置为“ omniORB树的根”,而不是 omn​​iORBpy。

Not sure here, but I don't think, that changes made to the environment via a batch script will persist across reboots. 在此处不确定,但我认为通过批处理脚本对环境所做的更改将在重新启动后继续存在。 Try setting the variable via the Workstation properties (sorry, I have no Windows machine at hand, and cannot give more than a few general directions): 尝试通过Workstation属性设置变量(对不起,我手头没有Windows机器,并且不能提供几个以上的一般指导):

Right click on the Workstation icon on your desktop. 右键单击桌面上的工作站图标。 Select "Manage..." (I think it was) 选择“管理...”(我认为是)

Somewhere in the advanced settings, you can modify environment variables (no need to reboot, but you may have to fire up a new CMD.EXE afterwards, as running apps might not get the change). 在高级设置中的某个位置,您可以修改环境变量(无需重新启动,但之后可能必须启动新的CMD.EXE,因为正在运行的应用程序可能无法获取更改)。

Alternatively, you can create a small batch script to start you application, and make it modify the environment before the application is started (I think, this is, what the README actually suggests) 另外,您可以创建一个小的批处理脚本来启动您的应用程序,并使其在启动应用程序之前修改环境(我认为这是自述文件的实际建议)

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

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