PyVRML97需要较旧版本的PyOpenGL

时间:2014-03-12 22:26:34

标签: python python-2.7 pip pyopengl vrml

所以我设置了一个virtualenv,其中包含system-site-packages,名为vrmlmol。在vrmlmol env中,我使用yolk安装了pip 这是输出 -

(vrmlmol)debanjan@thinkpad:~/vrmlmol$ yolk -V PyOpenGL
PyOpenGL 3.1.0b1
PyOpenGL 3.0.2
PyOpenGL 3.0.1
(vrmlmol)debanjan@thinkpad:~/vrmlmol$ yolk -V PyVRML97
PyVRML97 2.3.0a4

如您所见,PyPI中不存在2.x版本的PyOpenGL。当我尝试安装PyOpenGL和PyVRML时,我得到以下依赖失败:

(vrmlmol)debanjan@thinkpad:~/vrmlmol$ pip install -I PyOpenGL PyVRML97 
Downloading/unpacking PyOpenGL
  Downloading PyOpenGL-3.0.2.tar.gz (891kB): 891kB downloaded
  Running setup.py egg_info for package PyOpenGL

    warning: no previously-included files matching '*.odt' found anywhere in distribution
    warning: no previously-included files matching '*.odp' found anywhere in distribution
    warning: no previously-included files matching '.cvsignore' found anywhere in distribution
    warning: no previously-included files matching '*.diff' found anywhere in distribution
    warning: no previously-included files found matching 'src/*.h'
    warning: no previously-included files found matching 'src/*.xml'
    warning: no previously-included files found matching 'src/*.zip'
    warning: no previously-included files found matching 'src/*.pdf'
    warning: no previously-included files found matching 'src/*.zip'
    warning: no previously-included files found matching 'src/*.txt'
    warning: no files found matching 'src/win32deps.py'
    warning: no files found matching 'src/toglinstall/get_togl.py'
    warning: no files found matching 'ChangeLog.txt'
    warning: no previously-included files found matching 'OpenGL_accelerate'
Downloading/unpacking PyVRML97
  Could not find a version that satisfies the requirement PyVRML97 (from versions: 2.2.0a4, 2.2.0a5, 2.2.0a5, 2.2.0a6, 2.2.0a6, 2.2.0a7, 2.2.0a7, 2.2.0a8, 2.2.0a8, 2.3.0a1, 2.3.0a1, 2.3.0a2, 2.3.0a2, 2.3.0a3, 2.3.0a3, 2.3.0a4, 2.3.0a4)
Cleaning up...
No distributions matching the version for PyVRML97
Storing complete log in /home/debanjan/.pip/pip.log

由于这些软件包不存在,我没有看到使用pip安装更新的PyVRML或更旧的PyOpenGL的任何选项。有帮助吗?我试图让一些同事轻松开始他们自己的设置..所以pip对他们来说会很好。

1 个答案:

答案 0 :(得分:2)

这是PIP最近更改的副作用,默认情况下不允许安装alpha / beta版本。 PyVRML97的最后一个“最终”版本是如此之久以至于它依赖于PyOpenGL 2.x(它已经过时,而且不再可以通过自动化工具从SourceForge中检索)。

不幸的是,我已经失去了最终版本的PyVRML97和OpenGLContext,因为我经常将它们视为PyOpenGL的个人测试环境。在我解决之前,你需要明确指定alpha版本。

要解决特定问题,您需要明确指定PyVRML97版本:

$ pip install "PyVRML97==2.3.0a4"

要安装一个完整的,有效的PyVRML97 / OpenGLContext环境,其中包含Python 2.7(Linux上)所有软件包的最新发布版本,您的命令行将如下所示:

$ virtualenv oglc-env
$ source oglc-env/bin/activate
(oglc-env)$ pip install PyOpenGL PyOpenGL_accelerate "PyVRML97==2.3.0a4" simpleparse numpy "OpenGLContext==2.2.0a3" pydispatcher pillow

您可能会发现枕头需要在系统级别安装额外的依赖项才能安装它(我的机器上已有这些依赖项)。我刚刚在Kubuntu 13.10机器上测试了安装过程,并使用生成的virtualenv运行OpenGLContext演示脚本。