First time here? Check out the FAQ!

Ask Your Question
2

Cannot use pip because pip is configured with locations that require TLS/SSL

asked 8 years ago

edenharder gravatar image

updated 8 years ago

I installed pip by sage -i pip, but when I use pip to install some python packages, it always gives the following error message:

sys:1: RuntimeWarning: not adding directory '' to sys.path since everybody can write to it. Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting octave_kernel Could not fetch URL https://pypi.python.org/simple/octave-kernel/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Could not find a version that satisfies the requirement octave_kernel (from versions: ) No matching distribution found for octave_kernel

Then I followed this post which says ./sage -i pyopenssl, but this step fails for me also.

Preview: (hide)

Comments

Could you please give us some informations so that someone can try to understand where your problem comes from:

  • which version of Sage did you use ?
  • which OS ?
  • did you install Sage from the binaries, and which ones ?
  • did you compile Sage yourself ?
  • ... ?
tmonteil gravatar imagetmonteil ( 8 years ago )

I have the same issue and I have the following, 8, but was available on 7.6 also, macOS, http://mirrors.mit.edu/sage/osx/intel/sage-8.0-OSX_10.12.6-x86_64.app.dmg (http://mirrors.mit.edu/sage/osx/intel...) but I used brew for installing it.

ebraminio gravatar imageebraminio ( 7 years ago )

2 Answers

Sort by » oldest newest most voted
2

answered 8 years ago

tmonteil gravatar image

updated 4 years ago

Preview: (hide)
link

Comments

This solution doesn't work for me. I still get the SSL problem mentioned in the OP. Do you have to uninstall pip in sage?

Ackbach gravatar imageAckbach ( 7 years ago )

Note: @Ackbach's comment refers to a previous version of @tmonteil's answer.

slelievre gravatar imageslelievre ( 4 years ago )
0

answered 4 years ago

posita gravatar image

updated 4 years ago

UPDATE: I totally missed the answer above pointing to https://ask.sagemath.org/question/511... . Perhaps this should be closed as a dup?


This still happens for me, even in 9.1 (on OS X installed via downloaded .dmg). In my case:

% ( set -ex ; cd ~/Applications/SageMath.app/Contents/Resources/sage ; ./local/bin/sage -pip install py-heat-magic )
+-zsh:21> cd /Users/…/Applications/SageMath.app/Contents/Resources/sage
+-zsh:21> ./local/bin/sage -pip install py-heat-magic
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting py-heat-magic
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/py-heat-magic/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/py-heat-magic/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/py-heat-magic/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/py-heat-magic/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/py-heat-magic/
  Could not fetch URL https://pypi.org/simple/py-heat-magic/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/py-heat-magic/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  Could not find a version that satisfies the requirement py-heat-magic (from versions: )
No matching distribution found for py-heat-magic
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 8 years ago

Seen: 7,542 times

Last updated: Aug 19 '20