Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install python3.4 in home 'not root'? ensurepip failure

I do not have root privileges on the Red Hat Linux machine I am installing python3.4 on.

Downloaded Python-3.4.1.tgz

tar -xzf Python-3.4.1.tgz
./configure
makealtinstall --with-ensurepip=install prefix=~ exec-prefix=~

Python3 does install, but I don't have pip. I get the following error:

Ignoring ensurepip failure: pip 1.5.6 requires SSL/TLS

I don't have root access so I cannot install via:

sudo apt-get install libssl-dev openssl

I do have a working version of openssl.

Does anyone have suggestions I could try?

like image 743
rbigley Avatar asked Jun 26 '14 14:06

rbigley


Video Answer


2 Answers

Since you are in RedHat, you have to install openssl-devel

yum install openssl-devel

Or you can install it later with get-pip.py

like image 95
Renato Mefi Avatar answered Oct 16 '22 05:10

Renato Mefi


The complete procedure for installing Python 3.4 with pip3/pip3.4 on RHEL7 is below. For Ubuntu 12.04 LTS replace yum with apt-get, openssl-devel with libssl-dev and you are good to go:

sudo yum install -y gcc make openssl-devel openssl
wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz
tar -xf Python-3.4.3.tgz
cd Python-3.4.3/
./configure --with-ensurepip=install
make
make install 

Alternatively, you can run make altinstall depending on whether you need create python link or not.

like image 36
Dex Avatar answered Oct 16 '22 04:10

Dex