安装模块虽然成功为啥都出现以下出错提示,什么原因?


#1

(FlaskProjects-BArbVR56) D:\FlaskProjects\FlaskHTTP\bluelog>pipenv install pillow
Installing pillow…
Collecting pillow
Downloading https://files.pythonhosted.org/packages/20/59/edb6fe64a608afc9fd1faf3470774b4131b4be9d40c496b0c144033e249a/Pillow-5.4.1-cp37-cp37m-win_amd64.whl (2.0MB)
Installing collected packages: pillow
Successfully installed pillow-5.4.1

Adding pillow to Pipfile’s [packages]…
Pipfile.lock (48b007) out of date, updating to (31edeb)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
l_cache)
File “d:\phthon37\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py”, line 297, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\resolve.py”, line 263, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\resolve.py”, line 213, in _get_abstract_dist_for
self.require_hashes
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\operations\prepare.py”, line 279, in prepare_linked_requirement
progress_bar=self.progress_bar
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 837, in unpack_url
progress_bar=progress_bar
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 674, in unpack_http_url
progress_bar)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 898, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 618, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\utils\hashes.py”, line 48, in check_against_chunks
for chunk in chunks:
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 586, in written_chunks
for chunk in chunks:
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_internal\download.py”, line 575, in resp_read
decode_content=False):
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_vendor\urllib3\response.py”, line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_vendor\urllib3\response.py”, line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “D:\Phthon37\Lib\contextlib.py”, line 130, in exit
self.gen.throw(type, value, traceback)
File “d:\phthon37\lib\site-packages\pipenv\patched\notpip_vendor\urllib3\response.py”, line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
pipenv.patched.notpip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.

Traceback (most recent call last):
File “d:\phthon37\lib\weakref.py”, line 624, in _exitfunc
f()
File “d:\phthon37\lib\weakref.py”, line 548, in call
return info.func(*info.args, **(info.kwargs or {}))
File “d:\phthon37\lib\site-packages\pipenv\vendor\vistir\compat.py”, line 108, in _cleanup
rmtree(name)
File “d:\phthon37\lib\site-packages\pipenv\vendor\vistir\path.py”, line 248, in rmtree
directory, ignore_errors=ignore_errors, onerror=handle_remove_readonly
File “d:\phthon37\lib\shutil.py”, line 507, in rmtree
return _rmtree_unsafe(path, onerror)
File “d:\phthon37\lib\shutil.py”, line 368, in _rmtree_unsafe
onerror(os.scandir, path, sys.exc_info())
File “d:\phthon37\lib\shutil.py”, line 365, in _rmtree_unsafe
with os.scandir(path) as scandir_it:
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: b’C:\Users\\AppData\Local\Temp\pipenv-3ypg3ua1-requirements’


#2

似乎和SSL证书有关,建议阅读Github中的相关issue


#3

Pipenv 对 Windows 的支持挺糟糕的,命令出错可以多执行几次试试。