2

我已经在我的 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 包?

4

1 回答 1

3

你需要easy_install3. 在 apt-get 你得到它

apt-get install python3-setuptools
于 2013-10-13T20:03:49.367 回答