python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1437字,纯文字阅读大概需要3分钟。
内容图文
![python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install](/upload/InfoBanner/zyjiaocheng/746/a70d8f02c1dc4af2a28e1b68b69f9e8e.jpg)
我正在尝试安装tweepy(并通过扩展oauthlib),并且在尝试安装时遇到以下错误:
Collecting requests-oauthlib>=0.4.1 (from tweepy)
Using cached requests_oauthlib-0.7.0-py2.py3-none-any.whl
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.4.1->tweepy)
Using cached oauthlib-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/t7/751h0y1102z99ysr6659yjcr0000gn/T/pip-build-aoklhwtw/oauthlib/setup.py", line 70, in <module>
'Topic :: Software Development :: Libraries :: Python Modules',
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 263, in __init__
self.patch_missing_pkg_info(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 246, in patch_missing_pkg_info
key = pkg_resources.safe_name(str(attrs['name'])).lower()
AttributeError: module 'pkg_resources' has no attribute 'safe_name'
有趣的是,/ private / var / folders / t7 / 751h0y1102z99ysr6659yjcr0000gn / T / pip-build-aoklhwtw / oauthlib /文件夹不存在,所以我可以
甚至删除/看得更近.
可能导致这种情况的任何想法?
解决方法:
找到了解决方案.我不得不升级setuptools,所以:
$sudo pip3 install --upgrade setuptools
内容总结
以上是互联网集市为您收集整理的python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install全部内容,希望文章能够帮你解决python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。