0

I am trying to install Scipy to run on Jupyter (in VirtualBox Ubuntu OS, Windows Host). I type the following command and get errors. How can I fix it?

python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
Requirement already satisfied: numpy in /home/anaconda3/lib/python3.7/site-packages (1.17.0)
Collecting scipy
  Downloading https://files.pythonhosted.org/packages/94/7f/b535ec711cbcc3246abea4385d17e1b325d4c3404dd86f15fc4f3dba1dbb/scipy-1.3.1-cp37-cp37m-manylinux1_x86_64.whl (25.2MB)
     |▏                               | 174kB 5.9kB/s eta 1:10:27ERROR: Exception:
Traceback (most recent call last):
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 425, in _error_catcher
    yield
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 507, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "/home/anaconda3/lib/python3.7/http/client.py", line 447, in read
    n = self.readinto(b)
  File "/home/anaconda3/lib/python3.7/http/client.py", line 491, in readinto
    n = self.fp.readinto(b)
  File "/home/anaconda3/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "/home/anaconda3/lib/python3.7/ssl.py", line 1052, in recv_into
    return self.read(nbytes, buffer)
  File "/home/anaconda3/lib/python3.7/ssl.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 "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 382, in run
    resolver.resolve(requirement_set)
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
    self._resolve_one(requirement_set, req)
  File "/home/anaconda3/lib/python3.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/anaconda3/lib/python3.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/anaconda3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 194, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/download.py", line 465, in unpack_url
    progress_bar=progress_bar
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/download.py", line 316, in unpack_http_url
    progress_bar)
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/download.py", line 551, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/download.py", line 253, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/home/anaconda3/lib/python3.7/site-packages/pip/_internal/utils/hashes.py", line 80, in check_against_chunks
...
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

1 Answer 1

0

The error is in the trace you have provided: socket.timeout: The read operation timed out It looks like your internet connection is intermittent or dropping.

Is there any reason you are using pip instead of conda?

You can install scipy using conda install -c anaconda scipy

1
  • VirtualBox:~/Downloads$ conda Traceback (most recent call last): File "/home/anaconda3/bin/conda", line 12, in <module> from conda.cli import main ModuleNotFoundError: No module named 'conda' Commented Nov 1, 2019 at 0:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .