CentOS 7 already has Python2.7.5 stock installed. I am doing an online course that requires Python3.x installed. So these are the following steps i took to install Python3.7.3.rc1 :
$cd /usr/src
$sudo wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3rc1.tgz
$sudo tar xzf Python-3.7.3rc1.tgz
$cd Python-3.7.3rc1
$sudo ./configure --enable-optimizations
$sudo make altinstall
$sudo rm /usr/src/Python-3.7.3rc1.tgz
$python3.7 --version
Python 3.7.3rc1
I followed these steps religiously from this link : https://tecadmin.net/install-python-3-7-on-centos/
During my course i was required to install pyperclip using pip. So i did :
$python3.7 -m pip install pyperclip
/usr/local/bin/python3.7: No module named pip
Please suggest a method to install pip for Python3.7.3rc1.
Single Python in system x : sudo python -m pip install [package] If the package is for python 3. x : sudo python3 -m pip install [package]
You should have taken the default available python3, that is the python3.6 package in centos7 that would have been easier to setup rather than compile an unsupported version. Suggest you install the supported python3 package in centos
Try doing yum install python36 from repository
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
Update yum package
sudo yum update
Install python36 along with pip
sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
Below steps are for python3.7, suggest avoiding unsupported packages. Alternate Steps for pip setup for Centos You need to install pip for python3.7 series Step 1: First install the EPEL Repository
sudo yum install epel-release
Step 2: Installing pip
python37 -m pip
Step 3: Verify if pip was installed properly pip --version
If the command not found error shows up, try
python37 -m ensurepip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With