简体   繁体   English

在 Mac 上为 Python 3 安装 Tweepy

[英]Installing Tweepy for Python 3 on Mac

I have posted this question before and it seems like no one is able to guide me.我之前发布过这个问题,似乎没有人能够指导我。 I want to run tweepy on Python 3. I have it working on Python 2 right now.我想在 Python 3 上运行 tweepy。我现在让它在 Python 2 上运行。

I followed the steps on this page我按照此页面上的步骤操作

https://github.com/tweepy/tweepy https://github.com/tweepy/tweepy

When I go to write当我去写作

python3 setup.py install

I get this message of it downloading which obviously means it is not downloading properly.我收到这条正在下载的消息,这显然意味着它没有正确下载。

Why won't it download properly on Python 3?为什么它不能在 Python 3 上正确下载?

running install
running bdist_egg
running egg_info
writing tweepy.egg-info/PKG-INFO
writing dependency_links to tweepy.egg-info/dependency_links.txt
writing requirements to tweepy.egg-info/requires.txt
writing top-level names to tweepy.egg-info/top_level.txt
reading manifest file 'tweepy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tweepy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build/bdist.macosx-10.6-intel/egg
creating build/bdist.macosx-10.6-intel/egg/examples
copying build/lib/examples/__init__.py -> build/bdist.macosx-10.6-intel/egg/examples
copying build/lib/examples/oauth.py -> build/bdist.macosx-10.6-intel/egg/examples
copying build/lib/examples/streaming.py -> build/bdist.macosx-10.6-intel/egg/examples
creating build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/__init__.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/api.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/auth.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/binder.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/cache.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/cursor.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/error.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/models.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/parsers.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/streaming.py -> build/bdist.macosx-10.6-intel/egg/tweepy
copying build/lib/tweepy/utils.py -> build/bdist.macosx-10.6-intel/egg/tweepy
byte-compiling build/bdist.macosx-10.6-intel/egg/examples/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/examples/oauth.py to oauth.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/examples/streaming.py to streaming.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/api.py to api.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/auth.py to auth.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/binder.py to binder.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/cache.py to cache.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/cursor.py to cursor.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/error.py to error.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/models.py to models.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/parsers.py to parsers.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/streaming.py to streaming.cpython-36.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/tweepy/utils.py to utils.cpython-36.pyc
creating build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/PKG-INFO -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/requires.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/top_level.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying tweepy.egg-info/zip-safe -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
creating 'dist/tweepy-3.6.0-py3.6.egg' and adding 'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing tweepy-3.6.0-py3.6.egg
Removing /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tweepy-3.6.0-py3.6.egg
Copying tweepy-3.6.0-py3.6.egg to /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
tweepy 3.6.0 is already the active version in easy-install.pth

Installed /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tweepy-3.6.0-py3.6.egg
Processing dependencies for tweepy==3.6.0
Searching for PySocks>=1.5.7
Reading https://pypi.python.org/simple/PySocks/
Download error on https://pypi.python.org/simple/PySocks/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found!
Couldn't find index page for 'PySocks' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found!
No local packages or working download links found for PySocks>=1.5.7
error: Could not find suitable distribution for Requirement.parse('PySocks>=1.5.7')

the solution:解决方案:

The problem isn't with tweepy it is with the certification in python3 so to fix that look at this link Python 3 : SSL: CERTIFICATE_VERIFY_FAILED问题不在于 tweepy,而是与 python3 中的认证有关,因此要解决此问题,请查看此链接Python 3 : SSL: CERTIFICATE_VERIFY_FAILED

then to install tweepy type python3 setup.py install然后安装 tweepy 类型python3 setup.py install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM