pip install

833 views
Skip to first unread message

Anne Schilling

unread,
May 5, 2017, 11:44:38 AM5/5/17
to sage-devel
Hi!

I am having some trouble installing pip packages:

sage -pip install snakeviz
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting snakeviz
  Could not fetch URL https://pypi.python.org/simple/snakeviz/: 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 snakeviz (from versions: )
No matching distribution found for snakeviz

When trying

make ssl
...
[pyopenssl]   Could not fetch URL https://pypi.python.org/simple/pyopenssl/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. -

I do have openssl installed:

openssl version -a
OpenSSL 1.1.0e 16 Feb 2017
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
compiler: cc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/mac-dev-env/openssl-1.1.0e/ssl\"" -DENGINESDIR="\"/usr/local/mac-dev-env/openssl-1.1.0e/lib/engines-1.1\""
OPENSSLDIR: "/usr/local/mac-dev-env/openssl-1.1.0e/ssl"
ENGINESDIR: "/usr/local/mac-dev-env/openssl-1.1.0e/lib/engines-1.1"

Any ideas?

Anne

Nicolas M. Thiery

unread,
May 5, 2017, 12:11:48 PM5/5/17
to sage-...@googlegroups.com

Just as an additional point of data: as can be seen in the error
message, this is on a Mac. Despite quite some e-mail ping-pong, I have
been unsuccessful trying to help Anne.

Sooo ... What's the recommended way to compile sage on a Mac to have
SSL and thus pip support?

Thanks,
Nicolas

On Fri, May 05, 2017 at 08:44:38AM -0700, Anne Schilling wrote:
> I am having some trouble installing pip packages:
> sage -pip install snakeviz
> pip is configured with locations that require TLS/SSL, however the ssl
> module in Python is not available.
> Collecting snakeviz
> Could not fetch URL https://pypi.python.org/simple/snakeviz/: 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 snakeviz
> (from versions: )
> No matching distribution found for snakeviz
> When trying
> make ssl
> ...
> [pyopenssl] Could not fetch URL [1]https://pypi.python.org/simple/pyopenssl/:
> There was a problem confirming the ssl certificate: Can't connect to HTTPS URL b
> ecause the SSL module is not available. -
> I do have openssl installed:
> openssl version -a
> OpenSSL 1.1.0e 16 Feb 2017
> built on: reproducible build, date unspecified
> platform: darwin64-x86_64-cc
> compiler: cc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_
> STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_
> BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_AS
> M -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DP
> ADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/mac-dev-env/openssl-1.1.0e/
> ssl\"" -DENGINESDIR="\"/usr/local/mac-dev-env/openssl-1.1.0e/lib/engines-1.1\""
> OPENSSLDIR: "/usr/local/mac-dev-env/openssl-1.1.0e/ssl"
> ENGINESDIR: "/usr/local/mac-dev-env/openssl-1.1.0e/lib/engines-1.1"
> Any ideas?
> Anne
>
> --
> You received this message because you are subscribed to the Google
> Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [2]sage-devel+...@googlegroups.com.
> To post to this group, send email to [3]sage-...@googlegroups.com.
> Visit this group at [4]https://groups.google.com/group/sage-devel.
> For more options, visit [5]https://groups.google.com/d/optout.
>
> References
>
> 1. https://pypi.python.org/simple/pyopenssl/
> 2. mailto:sage-devel+...@googlegroups.com
> 3. mailto:sage-...@googlegroups.com
> 4. https://groups.google.com/group/sage-devel
> 5. https://groups.google.com/d/optout

Nicolas
--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

John H Palmieri

unread,
May 5, 2017, 12:23:29 PM5/5/17
to sage-devel, Nicolas...@u-psud.fr
This is not a solution to the pip/ssl problem, but for a single package like snakeviz, you can go to https://pypi.python.org/pypi/snakeviz, download the tar.gz file, and then do

  sage -pip install /path/to/snakeviz-0.4.1.tar.gz

--
John

Anne Schilling

unread,
May 5, 2017, 12:35:35 PM5/5/17
to sage-devel, Nicolas...@u-psud.fr
Hi John,

Thank you, that worked!

It would still be interesting to understand whether the pip/ssl problem could be solved.

Best wishes,

Anne

Matthias Koeppe

unread,
May 5, 2017, 1:59:37 PM5/5/17
to sage-devel, Nicolas...@u-psud.fr
https://trac.sagemath.org/ticket/21944 has some work in this direction.

Nathan Dunfield

unread,
May 6, 2017, 11:23:43 AM5/6/17
to sage-devel, Nicolas...@u-psud.fr
On a good day, assuming the user has the Xcode command-line tools installed, the following suffices to get pip working with the current binary version of SageMath on macOS 10.12:

sage -i openssl
sage -f python2

It would be great if the next release of SageMath had a working version of pip on macOS as the current situation causes no end of trouble for a lot of people. 

Best, Nathan

Anne Schilling

unread,
May 6, 2017, 7:02:01 PM5/6/17
to sage-devel, Nicolas...@u-psud.fr
Hi Nathan,

Thanks for the suggestion! I had tried this earlier and it had not worked (due to some network issues I had with the computer). But now I tried again and
it actually did work!

Thank you,

Anne
Reply all
Reply to author
Forward
0 new messages