Python Forum
Python package installation issue.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python package installation issue.
#1
Hi

I have installed python3.6 in a custom path and set the python home ($PYTHON_HOME) and python path ($PATH).

when I tried to install any packages via PIP it fails with below SSL error. Any suggestions.

[infa@bdm ~]$ pip3.6 install numpy
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting numpy
Could not fetch URL https://pypi.python.org/simple/numpy/: 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 numpy (from versions: )
No matching distribution found for numpy
[infa@bdm ~]$ echo $PATH
/u01/app/infa/1021/services/shared/spark/python/bin:/u01/app/infa/1021/java/jre/bin:/u01/app/infa/1021:/u01/app/oracle/product/11.2.0/xe/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/jdk64/jdk1.8.0_112/bin:/apps/infa/pwx/1011hf1:/home/infa/bin:/home/infa/.local/bin:/home/infa/bin
[infa@bdm ~]$ echo $PYTHON_HOME
/u01/app/infa/1021/services/shared/spark/python
[infa@bdm ~]$

Thx in advance
Muthu
Reply
#2
You may by missing necessary OS modules like libssl-dev ect.. that is needed when build Python.
Can look here.
I also has setup here for use of pyenv.
pyenv is good and a better way than build Python yourself.
Eg how it look with 3.7 on linux.
# Update needed
sudo apt-get update
sudo apt-get install libffi-dev
 
# Install
mint@mint ~ $ pyenv install 3.7.0
Installing Python-3.7.0...
Installed Python-3.7.0 to /home/mint/.pyenv/versions/3.7.0
 
# Set python and pip to point to 3.7
mint@mint ~ $ pyenv global 3.7.0
mint@mint ~ $ python -V
Python 3.7.0
mint@mint ~ $ pip -V
pip 10.0.1 from /home/mint/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pip (python 3.7)
mint@mint ~ $ 
# Finish 
Reply
#3
The OS of my server is RHEL. libssl-dev is not available. But i have openssl and openssl-devel.

do I miss something here? please suggest.

Commands fired and output.
=========================

[root@bdm ~]# yum install libssl-dev
Loaded plugins: langpacks, product-id, search-disabled-repos
No package libssl-dev available.
Error: Nothing to do
[root@bdm ~]# yum install -y openssl-devel
Loaded plugins: langpacks, product-id, search-disabled-repos
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Nothing to do
[root@bdm ~]# yum install -y openssl
Loaded plugins: langpacks, product-id, search-disabled-repos
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Nothing to do
[root@bdm ~]#
Reply
#4
Hi

Its strange. The issue got resolved by reinstalling the python..

Thx
Muthu
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Preparing an Installation with Python JgKSuperstar 2 2,609 Nov-30-2021, 11:40 AM
Last Post: JgKSuperstar
  Software(Python) Installation. Navigate Refactor Run Tools VCS tab rgbrolly 3 2,558 Oct-19-2019, 08:09 PM
Last Post: buran
  Python installation change on Mac macloo 1 3,126 Jan-29-2018, 06:33 PM
Last Post: snippsat
  Python module cx_Oracle ld installation issue on Solaris11U3 SPARC: fatal: file /orac sameernatekar 0 2,782 May-24-2017, 10:47 AM
Last Post: sameernatekar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020