安装setuptools后找不到pkg_resources
我正在尝试在 Debian 5.0.3(64 位)上编译并安装 python2.6.4。我使用“make altinstall”安装,因为我想保留 Deb5.0 附带的 python 2.5.2 作为我的默认 python。
之后,我使用命令“sudo sh setuptools-0.6c11-py2.6.egg --prefix=/usr/local”安装了 setuptools 0.6c11。但是,安装后,当我尝试从 python2.6“导入 pkg_resources”时,它不起作用,说“ImportError:没有名为 pkg_resources 的模块”。没有 pkg_resources,我几乎无能为力。
有人可以在这里分享可能出了什么问题还是缺少什么?
I am trying to compile and install python2.6.4 on Debian 5.0.3 (64bit). I installed using 'make altinstall' as I want to keep python 2.5.2 that comes with Deb5.0 as my default python.
Following this, I installed setuptools 0.6c11 using the command 'sudo sh setuptools-0.6c11-py2.6.egg --prefix=/usr/local'. However, after installing when I try to 'import pkg_resources' from python2.6, it doesnt work saying 'ImportError: No module named pkg_resources'. Without pkg_resources, I can hardly do much.
Can someone share here what may be going wrong or what's missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
包装和包装集成很棘手。 Debian拥有Python 2.6,但出于某种内部原因,它仅在实验分支中:
我会使用该软件包,因为它很可能与其他Python包装更完整地集成在一起。另外,由于它是 .deb,因此您可以轻松卸载它。
debian-python 列表也许可以为您提供更多帮助。
Packaging and package integration is tricky. Debian has Python 2.6, but for some internal reason it is only in the experimental branch:
I would use that package as it is likely to be more fully integrated with the rest of python packaging. Plus, as it is a .deb, you can easily uninstall it.
And the debian-python list may be able to assist you further.