Discuss / Python / 安装Pillow时报错


Topic source

廖老师,我在安装Pillow时出现下面的报错,不明白什么意思,怎么回事呢? (windows,python3.4.3)

C:\Users\Administrator>pip install Pillow You are using pip version 6.0.8, however version 7.1.0 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting Pillow Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec tion broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', po rt=443): Read timed out. (read timeout=15)",)': /packages/cp34/P/Pillow/Pillow-2 .9.0-cp34-none-win_amd64.whl Downloading Pillow-2.9.0-cp34-none-win_amd64.whl (1.3MB) 0% | | 12kB 4.1MB/s eta 0:00:01 Exception: Traceback (most recent call last): File "D:\Python34\lib\site-packages\pip_vendor\requests\packages\urllib3\re sponse.py", line 186, in read data = self._fp.read(amt) File "D:\Python34\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py" , line 49, in read data = self.__fp.read(amt) File "D:\Python34\lib\http\client.py", line 500, in read return super(HTTPResponse, self).read(amt) File "D:\Python34\lib\http\client.py", line 539, in readinto n = self.fp.readinto(b) File "D:\Python34\lib\socket.py", line 374, in readinto return self._sock.recv_into(b) File "D:\Python34\lib\ssl.py", line 751, in recv_into return self.read(nbytes, buffer) File "D:\Python34\lib\ssl.py", line 623, in read v = self._sslobj.read(len, buffer) socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python34\lib\site-packages\pip\basecommand.py", line 232, in main status = self.run(options, args) File "D:\Python34\lib\site-packages\pip\commands\install.py", line 339, in r un requirement_set.prepare_files(finder) File "D:\Python34\lib\site-packages\pip\req\req_set.py", line 355, in prepar e_files do_download, session=self.session, File "D:\Python34\lib\site-packages\pip\download.py", line 782, in unpack_ur l session, File "D:\Python34\lib\site-packages\pip\download.py", line 667, in unpack_ht tp_url from_path, content_type = _download_http_url(link, session, temp_dir) File "D:\Python34\lib\site-packages\pip\download.py", line 843, in _download _http_url _download_url(resp, link, content_file) File "D:\Python34\lib\site-packages\pip\download.py", line 615, in _download _url for chunk in progress_indicator(resp_read(4096), 4096): File "D:\Python34\lib\site-packages\pip\utils\ui.py", line 46, in iter for x in it: File "D:\Python34\lib\site-packages\pip\download.py", line 580, in resp_read

File "D:\Python34\lib\site-packages\pip\_vendor\requests\packages\urllib3\re

sponse.py", line 256, in stream data = self.read(amt=amt, decode_content=decode_content) File "D:\Python34\lib\site-packages\pip_vendor\requests\packages\urllib3\re sponse.py", line 201, in read raise ReadTimeoutError(self._pool, None, 'Read timed out.') pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnec tionPool(host='pypi.python.org', port=443): Read timed out.







#6 Created at ... [Delete] [Delete and Lock User]

pip --default-timeout=100 install -U pip

  • 1