When a package's exact name is not known (python3, python38, something scl) file name searches can do a more complete search: yum provides '*bin/python3*'
Correct, there is no python3.8 in EPEL 7. There is a python3.6 in EL 7, and EPEL policy is not to replace EL packages. Plus the distro's policy to avoid major upgrades, would seem like it is stuck on older Python.
Your yum repo list hints that CentOS software collections are enabled, which could be an alternative.
yum install centos-release-scl-rh
yum install rh-python38-python
Note both the package name and the files are prefixed, which allows coexistence with other pythons. While perhaps SCL is not the most popular packaging convention, it is already built and public, an advantage over your own source builds.
Currently CentOS 7 is 87 weeks from end of life, which is not a lot by EL time scales. Most of the maintainer attention is on EL 8 and 9, 7 is critical fixes only.
Budget some of that time to figure out what you are are going to do post CentOS 7. Which may be non-trivial, as CentOS 8 is dead, and if Stream is not what you need, may be switching distros.
Answer from John Mahowald on serverfault.comInstalling from RPM is generally better, because:
- you can install and uninstall (properly) python3.
- the installation time is way faster. If you work in a cloud environment with multiple VMs, compiling python3 on each VMs is not acceptable.
Solution 1: Red Hat & EPEL repositories
Red Hat has added through the EPEL repository:
- Python 3.4 for CentOS 6
- Python 3.6 for CentOS 7
[EPEL] How to install Python 3.4 on CentOS 6
sudo yum install -y epel-release
sudo yum install -y python34
# Install pip3
sudo yum install -y python34-setuptools # install easy_install-3.4
sudo easy_install-3.4 pip
You can create your virtualenv using pyvenv:
pyvenv /tmp/foo
[EPEL] How to install Python 3.6 on CentOS 7
With CentOS7, pip3.6 is provided as a package :)
sudo yum install -y epel-release
sudo yum install -y python36 python36-pip
You can create your virtualenv using pyvenv:
python3.6 -m venv /tmp/foo
If you use the pyvenv script, you'll get a WARNING:
$ pyvenv-3.6 /tmp/foo
WARNING: the pyenv script is deprecated in favour of `python3.6 -m venv`
Solution 2: IUS Community repositories
The IUS Community provides some up-to-date packages for RHEL & CentOS. The guys behind are from Rackspace, so I think that they are quite trustworthy...
https://ius.io/
Check the right repo for you here:
https://ius.io/setup
[IUS] How to install Python 3.6 on CentOS 6
sudo yum install -y https://repo.ius.io/ius-release-el6.rpm
sudo yum install -y python36u python36u-pip
You can create your virtualenv using pyvenv:
python3.6 -m venv /tmp/foo
[IUS] How to install Python 3.6 on CentOS 7
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
sudo yum install -y python36u python36u-pip
You can create your virtualenv using pyvenv:
python3.6 -m venv /tmp/foo
It is easy to install python manually (i.e. build from source):
Download (there may be newer releases on Python.org):
$ wget https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xzUnzip
$ tar xf Python-3.* $ cd Python-3.*Prepare compilation
$ ./configureBuild
$ makeInstall
$ make installOR if you don't want to overwrite the
pythonexecutable (safer, at least on some distrosyumneedspythonto be 2.x, such as for RHEL6) - you can installpython3.*as a concurrent instance to the system default with analtinstall:$ make altinstall
Now if you want an alternative installation directory, you can pass --prefix to the configurecommand.
Example: for 'installing' Python in /opt/local, just add --prefix=/opt/local.
After the make install step: In order to use your new Python installation, it could be, that you still have to add the [prefix]/bin to the $PATH and [prefix]/lib to the $LD_LIBRARY_PATH (depending of the --prefix you passed)
python - Python38 packages on Fedora 31 yum - Unix & Linux Stack Exchange
No package python3 available.
Python 3.8 not possible to install on Linux? Why?
Could not load python38.dll.
As per the instructions on How to Install Python 3.8 on Ubuntu, Debian and LinuxMint – TecAdmin, try the following:
Prerequisites:
Install [and or update] the following packages; build-essential, checkinstall, libreadline-gplv2-dev, libncursesw5-dev, libssl-dev, libsqlite3-dev, tk-dev, libgdbm-dev, libc6-dev, libbz2-dev, libffi-dev, zlib1g-dev.
sudo apt install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
Thereafter, change directory (cd) to your opt folder [or any convenient folder] and download the python source code from python's server:
First change directory (cd) to the 'opt' folder:
cd /opt/
Download the source code
sudo wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
Extract the [downloaded] source code files
sudo tar xzf Python-3.8.3.tgz
Change directory (cd) the Python Folder [created after the extraction]
cd Python-3.8.3
Compile the source code
sudo ./configure --enable-optimizations
then
sudo make altinstall
Once the compilation is completed, you can confirm that Python 3.8 has been installed successfully with:
python3.8 -V
You should see the response Python-3.8.3.
However, to precisely answer your question, python 3.8 isn't available via ubuntu official repos. You would have to add a PPA to get python 3.8 using sudo apt install [python3.x.x].
The process is described on How to Install Python 3.8 on Ubuntu 18.04 | Linuxize
Hope this helps and I hope I answered your question adequately.
It looks like Python 3.8 is already installed but not set as default. Python 3.7.6 is set as default.
Update default Python3 version by below command.
sudo update-alternatives --config python3
Choose Python 3.8 option and check Python version again.
Monday, October 14, 2019 Python 3.8.0 is now available
I am attempting to install the latest Python 3.8.0 on CentOS 8, but it does not seem possible.
I search in Software Collections, and find nothing. The latest release there is Python 3.6 (released nearly three years ago - no updates in three years!!! - I'm abandoning Software Collections).
Python 3.6 was released on December 23rd, 2016, nearly three years ago.
I check in the RHEL / CentOS repos, and same darn thing, no python update in nearly three years.
#dnf list --available | grep python3
Nothing there for Python 3.8.0 or even Python 3.7.x for that matter. I'm not sure what the deal is with Python enthusiasts or RHEL/CentOS users that someone somewhere has not simply updated some repo somewhere, I can try and get involved.
Use the source:
https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
I download the Python 3.8.0 source from the link above, look at the dependencies and try to get those installed first, but no luck. The dependencies for 3.8.0 cannot be found or installed.
Dependencies attempted install via:
#!/bin/bash #dnf install dnf-plugins-core # install this to use 'dnf builddep' #dnf builddep python3 #dnf update -y
Results:
No matching package to install: 'libnsl2-devel' No matching package to install: 'bluez-libs-devel' No matching package to install: 'tix-devel' Not all dependencies satisfied Error: Some packages could not be found.
When I search for these, I find nothing in the repos:
#dnf list --available | grep libnsl2-devel #dnf list --available | grep bluez-libs-devel #dnf list --available | grep tix-devel
Nothing is returned for any of these dependencies.
What has to be done to get these dependencies in a repo somewhere so they can be installed so I can build the source code?
Better yet, how do I get Python 3.8.0 in some freaking repo some where, it's been three years since any RHEL or CentOS repo has been updated.
It's nearly 2020 already, can we please move forward please.
» pip install incompatible-with-python38
ppa:deadsnakes was decommissioned for Ubuntu 16.04 (Xenial Xerus). Try to build a custom .deb package.
Looks like deadsnakes repo no longer offers python3.8. This is what I see when I try to add the repo in Ubuntu 16.04
Supported Ubuntu and Python Versions
- Ubuntu 20.04 (focal) Python3.5 - Python3.7, Python3.9 - Python3.11
- Ubuntu 22.04 (jammy) Python3.7 - Python3.9, Python3.11
- Note: Python2.7 (all), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages.
You have to enable the EPEL repo, use:
yum --enablerepo=extras install epel-release
This command will install the correct EPEL repository for the CentOS version you are running.
After this you will be able to install python-pip.
I was going crazy about the same issue. The reason why yum couldn't find python-pip was that it is not called python-pip anymore. Starting with EPEL Version 7 it is renamed to identify the python version. On my centOS machine i can find now the following python*-pip packages.
[root@asdasdasdasdsa ~]# yum info python*-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.rz.uni-frankfurt.de
* epel: mirrors.mit.edu
* extras: mirror.23media.de
* updates: ftp.plusline.de
Available Packages
Name : python2-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python 2 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Name : python34-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python3 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.