Install tensorflow via pip but failed just as follows - python

Traceback (most recent call last):<br>
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main<br>
status = self.run(options, args)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run<br>
wb.build(autobuilding=True)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build<br>
self.requirement_set.prepare_files(self.finder)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))<br>
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url
hashes=hashes<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url
hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks<br>
for chunk in chunks:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks
for chunk in chunks:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter<br>
for x in it:<br>
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read
decode_content=False):<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 357, in stream<br>
data = self.read(amt=amt, decode_content=decode_content)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 324, in read<br>
flush_decoder = True<br>
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)<br>
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 246, in _error_catcher<br>
raise ReadTimeoutError(self._pool, None, 'Read timed out.')<br>
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

I solved it by modifying the command like this:
pip --default-timeout=100 install THEPACKAGENAME

You can also try installing using wheel packages.
The Wheel packages depend on the kind of operating system you have, the python version and whether you want to install with CPU/GPU support.
Also upgrade you protobuf before installing Tensorflow.
Please find a list of packages here:
https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package
You can then issue this command :
$ sudo pip install --upgrade <TF wheel package URL> - For Python 2.7
$ sudo pip3 install --upgrade <TF wheel package URL> - For Python 3.x
Tensorflow site has some details on some common installation problems. You can look at those as well, just in case.
https://www.tensorflow.org/install/install_linux#common_installation_problems

Related

Can't install python 3.8.1 scrapy in venv on windows 10 64 bits

I tried to install scrapy on my windows machine by using pip install scrapy and pip3 install scrapy but it is showing me the following error:
File "<string>", line 1, in <module>
File "C:\Users\ASUS\AppData\Local\Temp\pip-install-8lbz4g3u\Twisted\setup.py", line 20, in <module>
setuptools.setup(**_setup["getSetupArgs"]())
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
dist = self.package_index.fetch_distribution(
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 655, in fetch_distribution
dist = find(requirement)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 635, in find
loc = self.download(dist.location, tmpdir)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 579, in download
found = self._download_url(scheme.group(1), spec, tmpdir)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 824, in _download_url
return self._attempt_download(url, filename)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 830, in _attempt_download
headers = self._download_to(url, filename)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 729, in _download_to
fp = self.open_url(url)
File "c:\users\asus\desktop\utube\venv\lib\site-packages\setuptools\package_index.py", line 779, in open_url
raise DistutilsError("Download error for %s: %s"
distutils.errors.DistutilsError: Download error for https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d7533
5a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl#sha256=717e12246dddf231a349175f48d74d93e2897244939173b01974ab6661406b9f: _ssl.c:1091: The h
andshake operation timed out
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
So help me out how to fix this problem.
I have tried to install from pycharm also but it can't install there also
Based on the traceback you provided and this Github Issue the issue appears to be the "incremental" package dependency. You can try installing incremental (17.5.0) using pip install incremental==17.5.0 before installing scrapy.
Note that in the scrapy documentation installation guide it says:
"Though it’s possible to install Scrapy on Windows using pip, we
recommend you to install Anaconda or Miniconda and use the package
from the conda-forge channel, which will avoid most installation
issues."
So you could follow the steps in the documentation if installing incremental doesn't resolve your issues.

Error about Python when installing Tensorflow

Am have tried to download both tensorflow and tensorflow-gpu on Ubuntu16.04, it didn't work..
I was using pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
It's ok at first, but after a while it was stuck. it appears ERROR like below:
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tensorflow-gpu
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ce/9a/6a3985daf15d0b87b1ef3c499293cf0889cd294223a6ca28b9529770b29e/tensorflow_gpu-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl (380.8MB)
|▍ | 4.8MB 8.0kB/s eta 13:03:00ERROR: Exception:
Traceback (most recent call last):
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
status = self.run(options, args)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 382, in run
resolver.resolve(requirement_set)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
self._resolve_one(requirement_set, req)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 313, in _get_abstract_dist_for
req, self.session, self.finder, self.require_hashes
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 194, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 465, in unpack_url
progress_bar=progress_bar
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 316, in unpack_http_url
progress_bar)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 551, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 253, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/utils/hashes.py", line 80, in check_against_chunks
for chunk in chunks:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 223, in written_chunks
for chunk in chunks:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_internal/download.py", line 212, in resp_read
decode_content=False):
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/bayar/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 439, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
ReadTimeoutError: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Read timed out.
I have tried several times. I thought it were problem caused by pip, so I used pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu also. However, another problem came up.
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
Collecting tensorflow-gpu
Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
No matching distribution found for tensorflow-gpu
Could you do me a favor?
To install tensorflow try this
pip3 install --upgrade tensorflow
To install tensorflow-gpu try this
pip3 install tensorflow-gpu
Check your python path using
which python
If this is equal to the python's expected path
then use the following commands to install the packages.
python -m pip install tensorflow
python -m pip install tensorflow-gpu

pip upgrade:" python -m pip install --upgrade" says already up-to-date(18.0), "pip --version" says (10.0.1)

I was trying to install some packages from PyPI through pip in "cmd" on Windows 7 as in:
C:\Users\acer\PycharmProjects\Test\venv\Scripts>pip install (some package)
But installation failed with the following message(directly as received from cmd):
Exception:
Traceback (most recent call last):
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 302, in _error_catcher
yield
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 384, in read
data = self._fp.read(amt)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\cachecontrol\filewrapper.py", line 60, in read
data = self.__fp.read(amt)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\http\client.
py", line 447, in read
n = self.readinto(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\http\client.
py", line 491, in readinto
n = self.fp.readinto(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\socket.py",
line 589, in readinto
return self._sock.recv_into(b)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 1049, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 908, 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\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\commands\install.py", line 291, in run
resolver.resolve(requirement_set)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 257, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
self.require_hashes
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\operations\prepare.py", line 310, in prepare_linked_require
ment
progress_bar=self.progress_bar
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 837, in unpack_url
progress_bar=progress_bar
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 674, in unpack_http_url
progress_bar)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 898, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 618, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\utils\hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 586, in written_chunks
for chunk in chunks:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\utils\ui.py", line 159, in iter
for x in it:
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_internal\download.py", line 575, in resp_read
decode_content=False):
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "C:\Users\acer\AppData\Local\Programs\Python\Python37-32\lib\contextlib.p
y", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3
.7.egg\pip\_vendor\urllib3\response.py", line 307, 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.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have tried to upgrade pip to version 18.0, so I ran python -m pip install --upgrade on cmd (Windows 7):
C:\Users\acer\PycharmProjects\Test\venv\Scripts>python -m pip install --upgrade pip
And after running it, I typed pip --version to check the version I have now:
C:\Users\acer\PycharmProjects\Test\venv\Scripts>pip --version
But the response was that I have pip version 10.0.1 :
pip 10.0.1 from c:\users\acer\pycharmprojects\test\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip (python 3.7)
After running the upgrade command again, the response was pip is already up-to-date:
Requirement already up-to-date: pip in c:\users\acer\pycharmprojects\test\venv\lib\site-packages (18.0)
Why is there a difference between the two answers? And how to upgrade pip properly?

Cannot create Virtualenv in Python

I'm struggling with virtualenv in Python.
After virtualenv _env I get:
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/python2
Also creating executable in /home/marcin/Documents/Projects/django_tutorial/_env/bin/python
Installing setuptools, pkg_resources, pip, wheel...
Complete output from command /home/marcin/Documen...ial/_env/bin/python2 - setuptools pkg_resources pip wheel:
Collecting setuptools
Downloading setuptools-38.4.0-py2.py3-none-any.whl (489kB)
Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 821, in unpack_url
hashes=hashes
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 659, in unpack_http_url
hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 571, in written_chunks
for chunk in chunks:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/share/python-wheels/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 560, in resp_read
decode_content=False):
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 397, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/marcin/Documents/Projects/django_tutorial/_env/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 312, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.
----------------------------------------
...Installing setuptools, pkg_resources, pip, wheel...done.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 2375, in <module>
main()
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 724, in main
symlink=options.symlink)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 992, in create_environment
download=download,
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 922, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File "/usr/lib/python2.7/dist-packages/virtualenv.py", line 817, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/marcin/Documen...ial/_env/bin/python2 - setuptools pkg_resources pip wheel failed with error code 2
I've got:
virtualenv 15.1.0
pip 9.0.1
Python 2.7.13
I'm out of ideas. I tried exporting locales, reinstalling pip, setuptools and virtualenv.
Do you have any suggestions? I will be grateful.
If you are in China, you can change your pip source to solve this issue.
mkdir ~/.pip
echo '[global]' > ~/.pip/pip.conf
echo 'index-url = https://pypi.tuna.tsinghua.edu.cn/simple' >> ~/.pip/pip.conf
By using the mirror of Tsinghua University, you might solve your problem.

Unable to upgrade Scipy using PIP

I try to upgrade Scipy using PIP on Ubuntu 16.04 but always receive this error. I'm not sure what is going on. The progress reaches 99% and then stops, and spits out this error.
I've tried upgrading pip but the same error still occurs.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 810, in unpack_url
hashes=hashes
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 649, in unpack_http_url
hashes)
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 871, in _download_http_url
_download_url(resp, link, content_file, hashes)
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 595, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
for chunk in chunks:
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 563, in written_chunks
for chunk in chunks:
File "/usr/local/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
for x in it:
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 552, in resp_read
decode_content=False):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 353, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/response.py", line 310, in read
data = self._fp.read(amt)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 54, in read
self.__callback(self.__buf.getvalue())
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/controller.py", line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/cachecontrol/serialize.py", line 87, in dumps
).encode("utf8"),
MemoryError
Try to disable the cache during install using
pip install --no-cache-dir packageName
where packageName is scipy in this case
The last line says "MemoryError"
Are you using a virtual environment?
If so, the environment probably requires more memory to be allocated to it.
Go to Player > Manage > Virtual Machine Settings
Here, drag the slider to choose a higher value of memory to be allocated.
Restart the virtual environment for the changes to take place.
I hope this helps!

Categories