开发者

Python OpenGL in Eclipse/Aptana

开发者 https://www.devze.com 2023-03-28 03:32 出处:网络
I am trying to import the OpenGL.GL module. Given the py file with that line, I can perform \"python file.py\" just fine, but I cannot run that sa开发者_如何学Gome file when used in Aptana or Eclipse

I am trying to import the OpenGL.GL module.

Given the py file with that line, I can perform "python file.py" just fine, but I cannot run that sa开发者_如何学Gome file when used in Aptana or Eclipse. Both IDEs have PyDev installed.

I do have PyOpenGL installed.

I wish to point out that I can still import other modules (PIL, numpy), which were installed the same way as the PyOpenGL. I am confident that there is only 1 python running on my MacOS.


I had the same problem after installing a different version of PyOpen and my Eclipse PyDev path is messed up. What I did was remove the interpreter link and re-added the old one which made PyDev to re-scan my libs. This seems to fix the problem. Don't forget for all your projects, you need to go to the property (Right click project->properties) and re-select the interpreter.


Maybe you need to reconfigure your interpreter.

If you installed PyOpenGL as an egg after pydev was set up your PYTHONPATH might be out of date.

Check out Preferences->PyDev->Interpreter - Python


Are you sure you don't have multiple versions of python? Seems to me like the interpreter that aptana uses is not the same as the one used from command line. You can look in:

Run -> Run configurations -> Python run -- then you have Interpreter tab

There you can click : See resulting command line. Than will get you the python that is used as well as the python path

0

精彩评论

暂无评论...
验证码 换一张
取 消