Installation from ubuntu failed

Dear sir
SCT is a very excellent toolbox for MR image processing, and I do grateful for your hardworks.
Now I have promblems when install SCT on win 10 with ubuntu. Though carefully following instructions, installation process failed.
“yes | ./install_sct”

“Traceback (most recent call last):
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 438, in _error_catcher
yield
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 519, in read
data = self._fp.read(amt) if not fp_closed else b”"
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/http/client.py”, line 463, in read
n = self.readinto(b)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/http/client.py”, line 507, in readinto
n = self.fp.readinto(b)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/socket.py”, line 586, in readinto
return self._sock.recv_into(b)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/ssl.py”, line 1012, in recv_into
return self.read(nbytes, buffer)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/ssl.py”, line 874, in read
return self._sslobj.read(len, buffer)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/ssl.py”, line 631, 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/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/cli/base_command.py”, line 224, in _main
status = self.run(options, args)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/cli/req_command.py”, line 180, in wrapper
return func(self, options, args)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/commands/install.py”, line 321, in run
reqs, check_supported_wheels=not options.target_dir
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 445, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 339, in resolve
failure_causes = self._attempt_to_pin_criterion(name, criterion)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 207, in _attempt_to_pin_criterion
criteria = self._get_criteria_to_update(candidate)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 198, in _get_criteria_to_update
for r in self._p.get_dependencies(candidate):
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/provider.py”, line 172, in get_dependencies
for r in candidate.iter_dependencies(with_requires)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/provider.py”, line 171, in
r
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 257, in iter_dependencies
requires = self.dist.requires() if with_requires else ()
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 239, in dist
self._prepare()
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 226, in _prepare
dist = self._prepare_distribution()
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py”, line 319, in _prepare_distribution
self._ireq, parallel_builds=True,
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”, line 480, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”, line 505, in _prepare_linked_requirement
self.download_dir, hashes,
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”, line 257, in unpack_url
hashes=hashes,
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/operations/prepare.py”, line 130, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/network/download.py”, line 163, in call
for chunk in chunks:
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/cli/progress_bars.py”, line 168, in iter
for x in it:
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_internal/network/utils.py”, line 88, in response_chunks
decode_content=False,
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py”, line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/contextlib.py”, line 99, in exit
self.gen.throw(type, value, traceback)
File “/home/felixi/sct/python/envs/venv_sct/lib/python3.6/site-packages/pip/_vendor/urllib3/response.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.

Failed running pip install: 2"

hope for your suggestions!
Felix

Hi Felix!

Welcome to the forums, and thank you for your question. This issue is likely caused by a slow or unreliable internet connection. Could you please try and run the installation script once more to see if it the error happens again?

Kind regards,
Joshua

Hi Mr.Joshua!

Thanks for your reply! I have tried four times but still failed to intall. Maybe I should try next time or try docker.
Thanks again!

Felix

Thank you for letting us know!

I have an idea of how to possibly fix this. It involves a small change to the install script. To do this:

  • Open the install_sct file in a text editor
  • Use Ctrl+F to find the line “pip install -r "$REQUIREMENTS_FILE" &&
  • Change the line to: “pip install -r "$REQUIREMENTS_FILE" --timeout 1000 &&
  • Try running the installation script once more.

We are also tracking this issue on the GitHub repository for the project here: https://github.com/neuropoly/spinalcordtoolbox/issues/3157

Kind regards,
Joshua

1 Like

Hi Felix! I noticed you made another post on the forum about SCT usage. Does this mean that your installation problem here has been solved?

If so, could you share what worked for you?

Thank you kindly,
Joshua

Hi @felixi, just following up to see if you still have an issue, or if we can close this ticket?