Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection timeout when issuing pip install -r requirements.txt #7849

Closed
jonsnowseven opened this issue Mar 12, 2020 · 2 comments
Closed

Connection timeout when issuing pip install -r requirements.txt #7849

jonsnowseven opened this issue Mar 12, 2020 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@jonsnowseven
Copy link

Environment

  • Python version: python 3.6
  • OS: Docker Container

Possibly duplicated from #4417

Description

Pip is failing to connect to its repository.

Output

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f398570bf98>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3985726dd8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3985726d68>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f3985726860>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f398570b438>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
ERROR: Could not find a version that satisfies the requirement pandas==0.25.3 (from -r /opt/ml/model/code/requirements.txt (line 2)) (from versions: none)
ERROR: No matching distribution found for pandas==0.25.3 (from -r /opt/ml/model/code/requirements.txt (line 2))
failed to install required packages, exiting
Traceback (most recent call last):
  File "/opt/conda/lib/python3.6/site-packages/sagemaker_inference/model_server.py", line 162, in _install_requirements
    subprocess.check_call(pip_install_cmd)
  File "/opt/conda/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', '-m', 'pip', 'install', '-r', '/opt/ml/model/code/requirements.txt']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/bin/dockerd-entrypoint.py", line 25, in <module>
    serving.main()
  File "/opt/conda/lib/python3.6/site-packages/sagemaker_pytorch_serving_container/serving.py", line 39, in main
    _start_model_server()
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 206, in call
    return attempt.get(self._wrap_exception)
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/opt/conda/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/opt/conda/lib/python3.6/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/opt/conda/lib/python3.6/site-packages/sagemaker_pytorch_serving_container/serving.py", line 35, in _start_model_server
    model_server.start_model_server(handler_service=HANDLER_SERVICE)
  File "/opt/conda/lib/python3.6/site-packages/sagemaker_inference/model_server.py", line 66, in start_model_server
    _install_requirements()
  File "/opt/conda/lib/python3.6/site-packages/sagemaker_inference/model_server.py", line 165, in _install_requirements
    raise ValueError('failed to install required packages')
ValueError: failed to install required packages
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f478df9dfd0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f478dfb8e10>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pandas/
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Mar 12, 2020
@jonsnowseven
Copy link
Author

Update:

I could solve because, for some reason, internet access failed in the machine where I was trying to run this.

Sorry for the unnecessary issue.

I'll close the issue now.

@uranusjr
Copy link
Member

#5380—it would be really helpful if we could provide a better error :)

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Apr 15, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Apr 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

2 participants