安装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的包。
关于出了什么问题以及如何解决它有什么想法吗?
I'm on Mac OS X Lion, and I have two Python versions on my machine (2.6 and 3.1). Unfortunately I have to have both 2 and 3 for different purposes (classes).
I'm trying to install the oauth2 module, and am receiving the following error
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
All my research indicates that this problem occurs because oauth isn't currently compatible with Python 3. However, I've checked and double-checked that "python" starts my 2.6 terminal and "python3" starts my 3.1 terminal. I've installed many packages before to Python 2.6 in this way.
Any ideas on what's wrong and how to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您自己安装了Python 2.6,则需要安装
setuptools
版本 或其较新的分支Distribute
该 Python 实例。每个 Python 实例必须有自己的版本。 Apple 提供的系统 Python 附带了已安装的setuptools
版本。If you installed the Python 2.6 yourself, you need to install a version of
setuptools
or its newer forkDistribute
for that Python instance. Each Python instance must have its own version. The Apple-supplied system Pythons come with versions ofsetuptools
already installed.安装Python 2.6或以上版本:
maraujop/requests-oauth
Install Python 2.6 or above version:
maraujop/requests-oauth