我没有太多使用Python的经验,需要一些帮助。我正在尝试安装不同的包,但没有成功。最近,我尝试使用pip install tabula-py安装tabula-py,但总是得到相同的响应。
如何解决这个问题?
Collecting tabula-py
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026AEB39CDC8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tabula-py/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026AEB3B0888>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tabula-py/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026AEB3BF088>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tabula-py/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026AEB3BF888>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tabula-py/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026AEB3BF6C8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tabula-py/
ERROR: Could not find a version that satisfies the requirement tabula-py (from versions: none)
ERROR: No matching distribution found for tabula-py发布于 2019-12-03 21:44:17
导致该错误的原因是pip无法连接到pypi.org服务器并下载必要的软件包并进行安装。
首先,尝试检查是否可以连接到pypi.org (从cmd或shell):
ping pypi.org
如果您通过常规外壳建立连接,则python3中的internet设置可能会出现问题。您可以检查是否可以通过此脚本进行连接:
import urllib.request
with urllib.request.urlopen('http://pypi.org/') as response:
status = response.status
if 500 > status >= 400:
print("Connection Error from Client: " + str(status))
elif 600 > status >= 500:
print("Connection Error from Server: " + str(status))
else:
print("Connection Successful")如果有连接问题,可以考虑tabula-py的downloading a wheel file,并在本地安装:
pip install /path/to/tabula_py-1.4.2-py3-none-any.whl
对于No matching distribution found...:请仔细检查您的python版本。在某些计算机上,您可能会发现多个版本的python,有时由第三方软件(如Microsoft Visual Studio)安装。使用以下命令检查您的pip版本:
pip -V
https://stackoverflow.com/questions/59157671
复制相似问题