linux - virtualenv yolk 调用中的 python3 导致 IOError

标签 linux python-3.x ubuntu-10.04 yolk

在ubuntu lucid中,我默认使用python 2.6.5。我编译了python3.3.1并设置了virtualenvwrapper,这样workon envpy331就可以让我在python3.3.1上工作。然后我使用pip安装了yolk

现在,当我运行时

>>yolk -l

它列出了即使在 python2.6.5 中也安装的所有 python 库,如下所示,最后抛出 IOError

BeautifulSoup   - 3.0.7a       - active development (/usr/local/lib/python2.6/dist-packages)
Brlapi          - 0.5.4        - active development (/usr/lib/pymodules/python2.6)
CouchDB         - 0.6          - active development (/usr/lib/pymodules/python2.6)
Django          - 1.3.1        - active development (/usr/local/lib/python2.6/dist-packages)
Fabric          - 1.5.1        - active development (/usr/local/lib/python2.6/dist-packages/Fabric-1.5.1-py2.6.egg)
...
nose            - 1.3.0        - active development (/usr/local/lib/python2.6/dist-packages)
numpy           - 1.3.0        - active 
nvidia-common   - 0.0.0        - active 
oauth           - 1.0a         - active 
odict           - 1.3.2        - active development (/usr/local/lib/python2.6/dist-packages/odict-1.3.2-py2.6.egg)
Traceback (most recent call last):
  File "/usr/local/bin/yolk", line 9, in <module>
    load_entry_point('yolk==0.4.3', 'console_scripts', 'yolk')()
  File "/usr/local/lib/python2.6/dist-packages/yolk/cli.py", line 1090, in main
    my_yolk.run()
  File "/usr/local/lib/python2.6/dist-packages/yolk/cli.py", line 203, in run
    return getattr(self, action)()
  File "/usr/local/lib/python2.6/dist-packages/yolk/cli.py", line 223, in show_all
    return self.show_distributions("all")
  File "/usr/local/lib/python2.6/dist-packages/yolk/cli.py", line 298, in show_distributions
    metadata = get_metadata(dist)
  File "/usr/local/lib/python2.6/dist-packages/yolk/metadata.py", line 38, in get_metadata
    msg = email.message_from_string(dist.get_metadata('PKG-INFO'))
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1488, in get_metadata
    f = open(self.path,'rU')
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.6/dist-packages/onboard-0.0.0.egg-info'

知道为什么会发生这种情况吗?我需要再次编译python3并设置virtualenv吗?

最佳答案

在 github 上的拉取请求中找到了答案

This will let people and tools (e.g.: https://python3wos.appspot.com/) know that yolk is compatible with Python 3. Should do a release to PyPI; it seems that the latest code in GitHub works with Python 3, but the last released version on PyPI (0.4.3; released 2012-02-06) doesn't work with Python 3.

所以请使用 github 版本

关于linux - virtualenv yolk 调用中的 python3 导致 IOError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16841713/

相关文章:

linux - Apache 多端口绑定(bind)

linux - 如何使用 netcat 更改监听规则?

c - linux 和 windows 速度不匹配

python-3.x - 如何使用 python 从 XML 创建嵌套字典?

regex - 如何在Python中使用正则表达式从字符串中获取日期?

python-2.7 - 如何从 Pyramid 终端手动运行定期 celery 任务?

ubuntu 10.0.4 出现内核 panic - 引导时不同步 : VFS: Unable to mount root fs on unknown-block(0, 0)

c - 如何从 execl 命令中捕获输出

python - 美丽汤 : how to find all elements 2nd parent of which has exact attribute?

linux - ubuntu10.4设置环境变量