Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
139 views
in Technique[技术] by (71.8m points)

python - Virtualenv timed out during installation

Hello Im new to python and Im using Windows 7. I was doing a python flask web application by doing the pip install virtualenvI was expecting it to run smoothly and finish installing in 30 seconds. But after 20 minutes, it popped out:

ERROR: Exception:
Traceback (most recent call last):
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorurllib3
esponse.py", line 438, in _error_catcher
    yield
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorurllib3
esponse.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorcachecontrolfilewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "C:Program FilesPython37libhttpclient.py", line 447, in read
    n = self.readinto(b)
  File "C:Program FilesPython37libhttpclient.py", line 491, in readinto
    n = self.fp.readinto(b)
  File "C:Program FilesPython37libsocket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "C:Program FilesPython37libssl.py", line 1052, in recv_into
    return self.read(nbytes, buffer)
  File "C:Program FilesPython37libssl.py", line 911, in read
    return 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 "c:userskelton learnflask_project1venvlibsite-packagespip\_internalcliase_command.py", line 224, in _main
    status = self.run(options, args)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internalcli
eq_command.py", line 180, in wrapper
    return func(self, options, args)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internalcommandsinstall.py", line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelib
esolver.py", line 122, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendor
esolvelib
esolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendor
esolvelib
esolvers.py", line 339, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendor
esolvelib
esolvers.py", line 207, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendor
esolvelib
esolvers.py", line 198, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibprovider.py", line 172, in get_dependencies
    for r in candidate.iter_dependencies(with_requires)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibprovider.py", line 171, in <listcomp>
    r
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibcandidates.py", line 257, in iter_dependencies
    requires = self.dist.requires() if with_requires else ()
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibcandidates.py", line 239, in dist
    self._prepare()
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibcandidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
esolution
esolvelibcandidates.py", line 319, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internaloperationsprepare.py", line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internaloperationsprepare.py", line 505, in _prepare_linked_requirement
    self.download_dir, hashes,
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internaloperationsprepare.py", line 257, in unpack_url
    hashes=hashes,
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internaloperationsprepare.py", line 130, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
etworkdownload.py", line 163, in __call__
    for chunk in chunks:
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internalcliprogress_bars.py", line 168, in iter
    for x in it:
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_internal
etworkutils.py", line 88, in response_chunks
    decode_content=False,
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorurllib3
esponse.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorurllib3
esponse.py", line 541, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "C:Program FilesPython37libcontextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:userskelton learnflask_project1venvlibsite-packagespip\_vendorurllib3
esponse.py", line 443, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

Anyone know the solution for this? I really need help. Please let me know what to do because I am not a professional at python. It is one of my projects to master python.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...