python ssl module error

214 views
Skip to first unread message

Scott Givan

unread,
Nov 10, 2017, 7:54:18 AM11/10/17
to rocks7-beta
Hi,

First of all, I realize this isn't a Rocks 7 problem, specifically, but I can't find a solution to it and the Google gods have not been forthcoming with a viable solution. So, if this is a simple fix, please just point me in the right direction.

I'm trying to use /opt/python/bin/pip to install python packages. But, I keep getting this error:

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



I've been unable to fix this and the most viable solution appears to be to recompile this version of python from source & include the SSL bindings, which seems problematic within the Rocks framework. Or, maybe I'm not really supposed to use the Rocks python for my own purposes (ie, it's there specifically for running Rocks-specific stuff)? If that's SOP, please let me know.

Philip Papadopoulos

unread,
Nov 10, 2017, 2:24:25 PM11/10/17
to Scott Givan, rocks7-beta
Scott,
I'm not seeing your problem. You probably didn't do a module load opt-python
before trying pip?

try
# module load opt-python
# pip install pysam


worked fine for me.  Rocks has it's own version of python (foundation-python) and is by definition the
same version as what the anaconda installer uses.  All rocks command use THAT version of python. The version
is tied because rocks MUST be compatible with the installer.  

The python roll provides an updated version of python (without stomping on the system version OR the foundation version)
This is to support "modern" editions of python and is the one to use for real application work. Python2 and Python3 are there.
virtualenv is available for both.  To use those, module load opt-python.


I checked the compile log of /opt/python , ssl is properly being built.

=== log of installing pysam
[root@ ~]# which python
/usr/bin/python
[root@ ~]# module load opt-python
[root@~]# which python
/opt/python/bin/python
[root@~]# pip install pysam
Collecting pysam
  Downloading pysam-0.13-cp27-cp27m-manylinux1_x86_64.whl (8.6MB)
    100% |████████████████████████████████| 8.6MB 163kB/s
Installing collected packages: pysam
Successfully installed pysam-0.13

-P


--
You received this message because you are subscribed to the Google Groups "rocks7-beta" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rocks7-beta+unsubscribe@googlegroups.com.
To post to this group, send email to rocks...@googlegroups.com.
Visit this group at https://groups.google.com/group/rocks7-beta.
To view this discussion on the web visit https://groups.google.com/d/msgid/rocks7-beta/8b1803fb-555b-412c-8444-a39d3a6fb6ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Philip Papadopoulos, Ph.D

Scott Givan

unread,
Nov 10, 2017, 5:09:14 PM11/10/17
to rocks7-beta
Loading the module first fixed my problem.

I initially assumed that was the intent of the python roll. Thanks for the explanation.
To unsubscribe from this group and stop receiving emails from it, send an email to rocks7-beta...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages