0

所以我设置了一个 virtualenv,打开了 system-site-packages,名为vrmlmol. 在vrmlmol我安装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 对他们来说会很高兴。

4

1 回答 1

2

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

不幸的是,我在发布 PyVRML97 和 OpenGLContext 的最终版本时一直失职,因为我经常将它们视为我个人的 PyOpenGL 测试环境。在我解决这个问题之前,您需要明确指定 alpha 版本。

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

$ pip install "PyVRML97==2.3.0a4"

要使用 Python 2.7(Linux 上)上所有软件包的当前最新发布版本安装完整的、可工作的 PyVRML97/OpenGLContext 环境,您的命令行应如下所示:

$ 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 演示脚本。

于 2014-03-20T15:47:53.013 回答