簡體   English   中英

在 Mac 上為 Python 3 安裝 Tweepy

[英]Installing Tweepy for Python 3 on Mac

我之前發布過這個問題,似乎沒有人能夠指導我。 我想在 Python 3 上運行 tweepy。我現在讓它在 Python 2 上運行。

我按照此頁面上的步驟操作

https://github.com/tweepy/tweepy

當我去寫作

python3 setup.py install

我收到這條正在下載的消息,這顯然意味着它沒有正確下載。

為什么它不能在 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')

解決方案:

問題不在於 tweepy,而是與 python3 中的認證有關,因此要解決此問題,請查看此鏈接Python 3 : SSL: CERTIFICATE_VERIFY_FAILED

然后安裝 tweepy 類型python3 setup.py install

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM