在 CentOS 8 上,我可以通过 yum 获取一系列 python 3.8 的软件包(见下文),最重要的是 python38-devel。
然而,在 Fedora 31 上,这些软件包都不可用。
有没有办法在 Fedora 31 上获取这些包,例如通过添加第三方存储库(类似于 apt 存储库)https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa)?
在 CentOS 8 上:
# yum repolist
Last metadata expiration check: 0:02:41 ago on Thu 26 Nov 2020 05:05:05 PM UTC.
repo id repo name status
AppStream CentOS-8 - AppStream 4,933
BaseOS CentOS-8 - Base 1,673
*epel Extra Packages for Enterprise Linux 8 - x86_64 6,721
*epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64 0
extras CentOS-8 - Extras 30
# yum search python38-
Last metadata expiration check: 0:03:45 ago on Thu 26 Nov 2020 05:05:05 PM UTC.
======================= Name Exactly Matched: python38 =======================
python38.x86_64 : Version 3.8 of the Python interpreter
python38.i686 : Version 3.8 of the Python interpreter
python38.x86_64 : Version 3.8 of the Python interpreter
============================================ Name Matched: python38- =============================================
python38-pip.noarch : A tool for installing and managing Python3 packages
python38-pip.noarch : A tool for installing and managing Python3 packages
python38-ply.noarch : Python Lex-Yacc
python38-six.noarch : Python 2 and 3 compatibility utilities
python38-libs.x86_64 : Python runtime libraries
python38-cffi.x86_64 : Foreign Function Interface for Python 3 to call C code
python38-idle.x86_64 : A basic graphical development environment for Python
python38-idna.noarch : Internationalized Domain Names in Applications (IDNA)
python38-libs.x86_64 : Python runtime libraries
python38-lxml.x86_64 : XML processing library combining libxml2/libxslt with the ElementTree API
python38-pytz.noarch : World Timezone Definitions for Python
python38-test.x86_64 : The self-test suite for the main python3 package
python38-devel.x86_64 : Libraries and header files needed for Python development
python38-babel.noarch : Library for internationalizing Python applications
python38-debug.x86_64 : Debug version of the Python runtime
python38-devel.x86_64 : Libraries and header files needed for Python development
python38-numpy.x86_64 : A fast multidimensional array facility for Python
python38-scipy.x86_64 : Scientific Tools for Python
python38-wheel.noarch : Built-package format for Python
python38-Cython.x86_64 : Language for writing Python extension modules
python38-jinja2.noarch : General purpose template engine for python3
python38-psutil.x86_64 : A process and system utilities module for Python
python38-pyyaml.x86_64 : YAML parser and emitter for Python
python38-tkinter.x86_64 : A GUI toolkit for Python
python38-PyMySQL.noarch : Pure-Python MySQL client library
python38-chardet.noarch : Character encoding auto-detection in Python
python38-pysocks.noarch : A Python SOCKS client module
python38-tkinter.x86_64 : A GUI toolkit for Python
python38-urllib3.noarch : Python3 HTTP library with thread-safe connection pooling and file post
python38-mod_wsgi.x86_64 : A WSGI interface for Python web applications in Apache
python38-psycopg2.x86_64 : A PostgreSQL database adapter for Python 3
python38-requests.noarch : HTTP library, written in Python, for human beings
python38-pip-wheel.noarch : The pip wheel
python38-numpy-doc.noarch : Documentation for numpy
python38-pip-wheel.noarch : The pip wheel
python38-pycparser.noarch : C parser and AST generator written in Python
python38-radicale3.noarch : Python module for Radicale
python38-setuptools.noarch : Easily build and distribute Python 3 packages
python38-asn1crypto.noarch : Fast Python ASN.1 parser and serializer
python38-markupsafe.x86_64 : Implements a XML/HTML/XHTML Markup safe string for Python 3
python38-numpy-f2py.x86_64 : f2py for numpy
python38-rpm-macros.noarch : RPM macros for building RPMs with Python 3.8
python38-setuptools.noarch : Easily build and distribute Python 3 packages
python38-wheel-wheel.noarch : The Python wheel module packaged as a wheel
python38-cryptography.x86_64 : PyCA's cryptography library
python38-psycopg2-doc.x86_64 : Documentation for psycopg python PostgreSQL database adapter
python38-psycopg2-tests.x86_64 : A testsuite for A PostgreSQL database adapter for Python 2
python38-setuptools-wheel.noarch : The setuptools wheel
python38-setuptools-wheel.noarch : The setuptools wheel
在 Fedora 31 上:
# yum repolist
Last metadata expiration check: 0:00:38 ago on Thu 26 Nov 2020 05:10:27 PM UTC.
repo id repo name status
*fedora Fedora 31 - x86_64 56,255
*fedora-modular Fedora Modular 31 - x86_64 142
*updates Fedora 31 - x86_64 - Updates 22,403
*updates-modular Fedora Modular 31 - x86_64 - Updates 139
# yum search python38
Last metadata expiration check: 0:01:40 ago on Thu 26 Nov 2020 05:10:27 PM UTC.
======================= Name Exactly Matched: python38 =======================
python38.x86_64 : Version 3.8 of the Python interpreter
python38.i686 : Version 3.8 of the Python interpreter
python38.x86_64 : Version 3.8 of the Python interpreter
答案1
在 Fedora 上,除解释器之外的 Python 3 软件包都带有前缀python3-
;因此dnf install python3-devel
。
Fedora 31 使用 Python 3.7。它已达到其使用寿命,因此您应该升级。 Fedora 32 将为您提供 Python 3.8,33 将为您提供 3.9。