安装Python oauth,setuptools问题

时间:2011-10-18 22:52:08

标签: python oauth setuptools

我在Mac OS X Lion上,我的机器上有两个Python版本(2.6和3.1)。不幸的是,我 将2和3用于不同的目的(类)。

我正在尝试安装oauth2模块,并收到以下错误

67-194-12-228:simplegeo-python-oauth2-1fcc1a6 xanderflood$ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

我所有的研究表明出现这个问题是因为oauth目前不兼容Python 3.但是,我检查并仔细检查“python”启动我的2.6终端,“python3”启动我的3.1终端。我以这种方式在Python 2.6之前安装了很多软件包。

关于什么是错的以及如何解决它的任何想法?

2 个答案:

答案 0 :(得分:2)

如果您自己安装了Python 2.6,则需要为该Python实例安装setuptools版本或其较新的fork Distribute。每个Python实例都必须有自己的版本。 Apple提供的系统Pythons已经安装了setuptools版本。

答案 1 :(得分:0)

安装Python 2.6或更高版本:

pip install requests-oauth

maraujop/requests-oauth