我尝试在 mac os x 终端中使用“pip install tweepy”命令安装 tweepy 包,安装在中间停止,出现与六个 python 实用程序相关的异常。 tweepy 似乎已部分安装,因为与其相关的一些文件仍然驻留在 python 的 sat-packages 中。
我还尝试使用 sudo 命令重新安装 pip 和 tweepy,但似乎没有任何效果。
//////这是命令“pip install tweepy”之后的消息日志
弃用:Python 2.7 将于 2020 年 1 月 1 日结束其生命周期。请升级您的 Python,因为该日期之后将不再维护 Python 2.7。 pip 的 future 版本将放弃对 Python 2.7 的支持。有关 pip 中 Python 2 支持的更多详细信息,请访问 https://pip.pypa.io/en/latest/development/release-process/#python-2-support 收集tweepy 使用缓存https://files.pythonhosted.org/packages/36/1b/2bd38043d22ade352fc3d3902cf30ce0e2f4bf285be3b304a2782a767aec/tweepy-3.8.0-py2.py3-none-any.whl 已满足要求:/Library/Python/2.7/site-packages 中的 PySocks>=1.5.7 (来自 tweepy)(1.7.0) 已满足要求:/Library/Python/2.7/site-packages 中的 requests-oauthlib>=0.7.0 (来自 tweepy)(1.2.0) 收集六个>=1.10.0(来自tweepy) 使用缓存https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl 已满足要求:/Library/Python/2.7/site-packages 中的 requests>=2.11.1 (来自 tweepy)(2.22.0) 已满足要求:/Library/Python/2.7/site-packages 中的 oauthlib>=3.0.0 (来自 requests-oauthlib>=0.7.0->tweepy)(3.1.0) 已满足要求:/Library/Python/2.7/site-packages 中的 urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (来自 requests>=2.11.1->tweepy) (1.25 .3) 已满足要求:/Library/Python/2.7/site-packages 中的 certifi>=2017.4.17 (来自 requests>=2.11.1->tweepy)(2019.6.16) 已满足要求:/Library/Python/2.7/site-packages 中的 chardet<3.1.0,>=3.0.2 (来自 requests>=2.11.1->tweepy) (3.0.4) 已满足要求:/Library/Python/2.7/site-packages 中的 idna<2.9,>=2.5 (来自 requests>=2.11.1->tweepy) (2.8) 安装收集的包:六、tweepy 发现现有安装:六个1.4.1
错误:无法卸载“六”。这是一个 distutils 安装的项目,因此我们无法准确确定哪些文件属于它,这将导致仅部分卸载
最佳答案
如果您使用 El-Capitan 那么此链接可以解决您的问题: https://github.com/pypa/pip/issues/3165
试试这个:
pip install awsebcli --upgrade --ignore-installed 6
在 OSX El Capitan 上运行
$ eb --版本
EB CLI 3.5.4(Python 2.7.1)
关于python - 无法在 Mac OS X 终端上使用 pip 安装 Tweepy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57840672/