python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install

python – AttributeError:module’pkg_resources’没有属性’safe_name’oauthlib install,第1张

概述我正在尝试安装tweepy(并通过扩展oauthlib),并且在尝试安装时遇到以下错误: Collecting requests-oauthlib>=0.4.1 (from tweepy)Using cached requests_oauthlib-0.7.0-py2.py3-none-any.whlCollecting oauthlib>=0.6.2 (from requests-oauth 我正在尝试安装tweepy(并通过扩展oauthlib),并且在尝试安装时遇到以下错误:

Collecting requests-oauthlib>=0.4.1 (from tweepy)Using cached requests_oauthlib-0.7.0-py2.py3-none-any.whlCollecting oauthlib>=0.6.2 (from requests-oauthlib>=0.4.1->tweepy)  Using cached oauthlib-2.0.0.tar.gzComplete 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所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1193757.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存