Today my python stopped working. I type in cmd pip install watchdog and get the errors(I wanna install some modules):
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "c:\users\eduard\appdata\local\programs\python\python38\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\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\http\client.py", line 454, in read
n = self.readinto(b)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\http\client.py", line 498, in readinto
n = self.fp.readinto(b)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\ssl.py", line 1099, 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:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\base_command.py", line 188, in _main
status = self.ruptions, args)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\req_command.py", line 185, in wrapper
return func(self, options, args)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\commands\install.py", line 332, in run
requirement_set = resolver.resolve(
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 314, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\operations\prepare.py", line 410, in prepare_linked_requirement
local_file = unpack_url(
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\operations\prepare.py", line 194, in unpack_url
file = get_http_url(
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\operations\prepare.py", line 123, in get_http_url
from_path, content_type = _download_http_url(
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\operations\prepare.py", line 220, in _download_http_url
for chunk in download.chunks:
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\cli\progress_bars.py", line 166, in iter
for x in it:
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_internal\network\utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "c:\users\eduard\appdata\local\programs\python\python38\lib\site-packages\pip_vendor\urllib3\response.py", line 430, 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.
I tried even easy_install watchdog and got The read operation timed out.
Some days earlier the pip was working, now it isn't. Other modules aren't installing too.
Please help me. What must I do??
IDK IF THIS WILL WORK BUT HERE GOES.....
There is a big problem with the new version of pip that you might be using. It's always better not to update pip to the new version.Use the version that gets installed with Python when you install it.
Uninstall pip and install it again.
pip uninstall pip
might work
Check this link to install pip
https://www.liquidweb.com/kb/install-pip-windows/
If this doesn't work , then reinstall Python and install pip through the installer and don't update it.And then try installing the required libraries....
Related
I have tried several times installing tensorflow on my Mac, my python version is 3.7.9,
TensorFlow is supported Python 3.5–3.8 (to my knowledge), and I keep get error when the process run about half:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 437, in _error_catcher
yield
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/http/client.py", line 461, in read
n = self.readinto(b)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/http/client.py", line 505, in readinto
n = self.fp.readinto(b)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/ssl.py", line 929, 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 "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
status = self.run(options, args)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
return func(self, options, args)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 324, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 340, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 469, in prepare_linked_requirement
hashes=self._get_linked_req_hashes(req)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 259, in unpack_url
hashes=hashes,
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 130, in get_http_url
link, downloader, temp_dir.path, hashes
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 282, in _download_http_url
for chunk in download.chunks:
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 168, in iter
for x in it:
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 88, in response_chunks
decode_content=False,
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/Caskroom/miniconda/base/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 442, 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.
Does anyone has encountered the same situation just like me ?
Read time out happens when the internet connection is not stable. Please check that. You can also try increasing the default timeout as follows:
pip --default-timeout=100 install tensorflow
I am not able to install packages using pip install. I am getting the following error. Any idea why?
C:\Users\suman>pip install pandas
Collecting pandas
Downloading pandas-1.1.1-cp37-cp37m-win_amd64.whl (9.4 MB)
|██████████▌ | 3.0 MB 8.6 kB/s eta 0:12:14ERROR: Exception:
Traceback (most recent call last):
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "c:\users\suman\appdata\local\programs\python\python37\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\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\suman\appdata\local\programs\python\python37\lib\http\client.py", line 457, in read
n = self.readinto(b)
File "c:\users\suman\appdata\local\programs\python\python37\lib\http\client.py", line 501, in readinto
n = self.fp.readinto(b)
File "c:\users\suman\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\suman\appdata\local\programs\python\python37\lib\ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "c:\users\suman\appdata\local\programs\python\python37\lib\ssl.py", line 929, 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:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in _main
status = self.run(options, args)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\req_command.py", line 185, in wrapper
return func(self, options, args)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 333, in run
reqs, check_supported_wheels=not options.target_dir
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 314, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 469, in prepare_linked_requirement
hashes=hashes,
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 259, in unpack_url
hashes=hashes,
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 130, in get_http_url
link, downloader, temp_dir.path, hashes
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 281, in _download_http_url
for chunk in download.chunks:
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\progress_bars.py", line 166, in iter
for x in it:
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
decode_content=False,
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\suman\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\suman\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, 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.
Have you tried :
pip3 install pandas
You may try as in this video:
https://www.youtube.com/watch?v=RvbUqf3Tb1s
I was trying to install numpy using pipenv with the code "pipenv install python" but it kept on coming up with errors. Below is the last output I got in my terminal while trying to install. Could someone please help me debug this.
When I was attempting to install numpy I got the following error:
Locking Failed!
Traceback (most recent call last):
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip_vendor\urllib3\response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\http\client.py", line 454, in read
n = self.readinto(b)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\http\client.py", line 498, in readinto
n = self.fp.readinto(b)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\socket.py", line 669, in
readinto
return self._sock.recv_into(b)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\calibest\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
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 807, in <module>
main()
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 802, in main
_main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, parsed.write,
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 785, in _main
resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 746, in resolve_packages
results, resolver = resolve(
File "c:/users/calibest/appdata/local/programs/python/python38-32/lib/site-packages/pipenv/resolver.py", line 728, in resolve
return resolve_deps(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\utils.py", line 1378, in resolve_deps
results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\utils.py", line 1093, in actually_resolve_deps
resolver.resolve()
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\utils.py", line 808, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\resolver.py", line 180, in resolve
has_changed, best_matches = self._resolve_one_round()
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\resolver.py", line 268, in _resolve_one_round
their_constraints.extend(self._iter_dependencies(best_match))
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\resolver.py", line 383, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 226, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 347, in get_legacy_dependencies
results, ireq = self.resolve_reqs(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\piptools\repositories\pypi.py", line 303, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 339, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\legacy_resolve.py", line 287, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 473, in prepare_linked_requirement
local_path = unpack_url(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 282, in unpack_url
return unpack_http_url(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\operations\prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_internal\network\utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\calibest\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\patched\notpip\_vendor\urllib3\response.py", line 430, 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.
Python should be installed by default. Try using pipenv --py to see the details of where the python interpreter is installed.
I was triying to install the large English module "en_core_web_lg" for spaCy (a library for Natural Language Processing)
For some reasons, the small and medium modules were successfully installed (with few errors at first),
but the large module always crashed installation.
I have used two different methods:
1)
$ python -m spacy download en_core_web_lg
2)
$ pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.0.0/en_core_web_lg-2.0.0.tar.gz
But in both cases I always got these two Exceptions:
(venv) omar#omar-device:~/virtualenvironment/my_new_app/bin/venv/bin$ pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.0.0/en_core_web_lg-2.0.0.tar.gz
Collecting https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.0.0/en_core_web_lg-2.0.0.tar.gz
Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.0.0/en_core_web_lg-2.0.0.tar.gz (852.3MB)
38% |████████████▎ | 325.7MB 114kB/s eta 1:16:26Exception:
Traceback (most recent call last):
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher
yield
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py", line 413, in read
data = self._fp.read(amt)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.5/http/client.py", line 448, in read
n = self.readinto(b)
File "/usr/lib/python3.5/http/client.py", line 488, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.5/ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.5/ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "/usr/lib/python3.5/ssl.py", line 575, 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 "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/basecommand.py", line 141, in main
status = self.run(options, args)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 299, in run
resolver.resolve(requirement_set)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 673, in unpack_http_url
progress_bar)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 897, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 619, in _download_url
consume(downloaded_chunks)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/utils/misc.py", line 844, in consume
deque(iterator, maxlen=0)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 585, in written_chunks
for chunk in chunks:
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_internal/download.py", line 574, in resp_read
decode_content=False):
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/omar/virtualenvironment/my_new_app/bin/venv/lib/python3.5/site-packages/pip/_vendor/urllib3/response.py", line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='github-production-release-asset-2e65be.s3.amazonaws.com', port=443): Read timed out.
I tried to reinstall Python3 at first, but crashed my desktop and terminal and had to fix that using the console :D (using this answer https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications).
try increasing pip timeout: pip install --default-timeout=900 [pkg_name]
I tried many times in both system environment and virtual environment, and reached 100% of downloading once (~850MB), then it gave me that error again ! So, the problem obviously was not in the downloading step, but in the direct installation after it.
So I thought about splitting the two steps:
first download the module using:
$ wget "https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-2.0.0/en_core_web_lg-2.0.0.tar.gz"
then install it using
$ pip install en_core_web_lg-2.0.0.tar.gz
and it worked smoothly.
It is true that I got around the original problem, but I still don't know what caused it to happen in the first place (if you knew, kindly write an answer for it).
I have python 3.5.2 installed. I also have pip 9.0.1 installed. The version number shows up when I type in the command python or pip --version. But when I try to install django using the command pip install Django, after a certain percentage, it stops downloading and the following error comes up on the command prompt. I have tried to set up the path but still the error shows up.
Exception:
Traceback (most recent call last):
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 232, in_error_catcher
yield
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 314, in read
data = self._fp.read(amt)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\http\client.py", line 448, in read
n = self.readinto(b)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\http\client.py", line 488, in readinto
n = self.fp.readinto(b)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\socket.py",line 575, in readinto
return self._sock.recv_into(b)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\ssl.py", line 575, 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 "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 659, in unpack_http_url
hashes)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\utils\hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 571, in written_chunks
for chunk in chunks:
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\utils\ui.py", line 139, in iter
for x in it:
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\download.py", line 560, in resp_read
decode_content=False):
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 324, in read
flush_decoder = True
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\dell\appdata\local\programs\python\python35-32\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 237, in_error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError:HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
What the traceback tells you is that the maximum time allocated to one read operation was spent and, thus, the operation was aborted. This may be due to a low connection speed, in which case a quick fix may be to increase the timeout time for installing a package. Try this:
pip --default-timeout=500 install django
where 500 is the amount of time in seconds. Feel free to increase / decrease it as you wish. Hope it helps.
You should use a virtualenv
to create a virtual environment. Then installing django: pip install django, not Django
!SOF: How to leave/exit/deactivate a python virtualenv? Link