如何在Windows中使用cmd安装SQLAlchemy

2024-09-27 19:24:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是Python3.82、PIP20.0.2,当我试图通过cmd安装SQLAlchemy时,我遇到了以下错误。我尝试了PyCharm,它再次给出了一个“异常错误”

C:\Users\Takunda Mafuta>pip install SQLAlchemy 
Collecting SQLAlchemy
  Downloading SQLAlchemy-1.3.15.tar.gz (6.1 MB)
     |█████▌                          | 1.0 MB 4.6 kB/s eta 0:18:11ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
    yield
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\http\client.py", line 454, in read
    n = self.readinto(b)
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\http\client.py", line 498, in readinto
    n = self.fp.readinto(b)
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "c:\users\takunda mafuta\appdata\local\programs\python\python38-32\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

Tags: inpyselfreadsqlalchemyliblocalline
1条回答
网友
1楼 · 发布于 2024-09-27 19:24:12

通常,当您的网络不稳定您与PyPi存储库的连接不稳定时,会发生此异常。尝试设置靠近您所在位置的存储库URL(例如,在您的国家/地区)。找到一个URL(通过搜索“pypi URL”+“#您的国家/地区”),并将其设置为如下link

相关问题 更多 >

    热门问题