Python、Ubuntu : Install PyPi package for a specific Python version

标签 python ubuntu python-3.3 easy-install pypi

我已经在我的 Ubuntu 机器上安装了 Python 3.3 和 Python 2.75。问题是 easy_install 仅获取默认的 2.75 版本的软件包,例如:

easy_install pymongo

$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymongo
>>>

但是:

$ python3.3
Python 3.3.1 (default, Apr 17 2013, 22:30:32) 
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymongo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

ImportError: No module named 'pymongo'

如何为 Python 3.3 安装安装 PyPi 软件包?

最佳答案

您需要easy_install3。在 apt-get 中你可以通过

apt-get install python3-setuptools

关于Python、Ubuntu : Install PyPi package for a specific Python version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19349644/

相关文章:

python - python 字典的缩写

python - 重定向后检索cookie

php - 使用 Apache 虚拟主机在 ubuntu 13.10 上设置 zf2

linux - Eclipse 不使用 .bashrc 中设置的路径

python - 将其写入文件的正确语法是什么?

python - 在 python 3.3 中安装 suds

python - pygame,如何获取图形的坐标?

python - JAX 0.2.17 和 JAX 0.4.1 之间巨大的内存需求差异

linux - ps -e、rss 与 vsz 的结果

pythonicalendar正确设置dtstart