python - 使用 pip 安装 Tweepy

标签 python macos python-3.x

我正在尝试使用 pip 命令安装 tweepy

pip install tweepy

但是它出现了错误

DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
...
OSError: [Errno 1] Operation not permitted: '/var/folders/zt/c358wgd9255dc9xc2c4s7p9c0000gn/T/pip-odKEwd-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

我的 Mac 运行 OSX 10.12

感谢您的帮助

最佳答案

既然您标记了 python-3.x,我的猜测是您还安装了 python 3 并且想使用它。 pip 命令默认用于安装 mac 附带的 python-2.7 软件包,但您没有修改库 6 的权限code> 对于内置的 python 2。因此,对于 python 3,您应该输入此代码 pip:

pip3 install tweepy

如果您确实尝试将 tweepy 安装到 python 2,那么您应该包含选项 --ignore-installed 6,该选项在安装需要 six 的软件包时是必需的因为包含的 six 模块无法流畅工作。因此,您应该输入忽略包含的 6 的命令并安装一个新的命令来覆盖它:

pip install tweepy --ignore-installed six

关于python - 使用 pip 安装 Tweepy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42939111/

相关文章:

python - tensorflow :将张量列表转换为在某个轴上具有固定暗淡的参差不齐的张量

Python重构: cleaning up imports

python - 如何在 Mac 上通过 Python 在 TextEdit 中打开文本文件?

c++ - Mac错误: Undefined symbols for architecture x86_64

Python - 连续转换日期时间对象,同时保持非日期时间对象相同

python - 来自分割的 3d 骨架

python - 使用 swig 将 c++ 编译为 python

macos - 如何在 Mac OSX 上使用 JDK 7?

python - 从一个文件中获取信息并在 Python 中打印到另一个文件

python - 如何将参数分组为程序帮助消息的部分