TGStat
TGStat
Type to search
Advanced channel search
  • flag English
    Site language
    flag Russian flag English flag Uzbek
  • Sign In
  • Catalog
    Channels and groups catalog Search for channels
    Add a channel/group
  • Ratings
    Rating of channels Rating of groups Posts rating
    Ratings of brands and people
  • Analytics
  • Search by posts
  • Telegram monitoring
NOC 的日常

20 Dec 2018, 07:10

Open in Telegram Share Report

Forward from: cnBeta.COM中文业界资讯站 - 总频道(精选新闻)
RHEL 8 中不再默认系统 Python 版本

RHEL 8 中不再默认 Python 版本。包括 RHEL 在内的大多数 Linux 发行版,用户除非离开系统的包管理器环境,否则一般是被默认限定在系统提供的 Python 版本中。对于像 Ruby、Node、Perl 与 PHP 在内的许多工具来说这都是习以为常的,但是 Python 的情况会比较复杂一些,因为许多 Linux 工具(如 yum)都直接依赖于 Python。
根据 PEP 394,目前 /usr/bin/python 默认是指 Python2,也就是 “Python”这一命令或者 Python 解释器将默认指向 Python2 版本。
Red Hat 官方在其开发者博客中发文称,针对这一点,为了改善用户体验,从 RHEL 8 Beta 开始不再强调“系统 Python”,不再默认一个 Python 版本。他们使用模块化的 Application Streams 设计,结合 Python 可多版本同时安装的特点,将为用户提供多个版本 Python 的选项,并且可以从标准存储库轻松安装到标准位置,用户可以选择他们想要在任何给定用户空间中运行的 Python 版本。
Application Streams 是在 RHEL 8 中引入的一类存储库,它提供用户可能希望在给定用户空间中运行的所有应用程序,它是在物理存储库中创建的多个虚拟存储库。
这种变化之后,用户想要使用 Python,需要直接指定 Python3 或者 Python2,而不是直接 Python。同时 yum install python 将返回 404,因为它同样需要指定安装版本。建议使用 yum install @python36 或 yum install @python27 安装推荐软件包,而如果只需要 Python 二进制文件,则可以使用 yum install python3 或 yum install python2。此外,pip 等工具也有变化,比如 Python3 将安装在 pip3 路径下,而不是没有版本指定的 pip 路径。
Red Hat 解释,除了提升用户体验,这种方案还让方便了系统维护人员,因为不会被锁定在系统中老版本的 Python 上,那么他们可以自由地利用新版本的语言功能与性能改进等优势。
相关文章:Red Hat收购混合云数据管理提供商 NooBaa IBM 受益红帽下月16日举行特别股东大会 讨论IBM 340亿美元收购事宜Red Hat Enterprise Linux进入微软商店...

PC版:https://www.cnbeta.com/articles/soft/800255.htm
手机版:https://m.cnbeta.com/view/800255.htm

130 0 0
Catalog
Channels and groups catalog Channels compilations Search for channels Add a channel/group
Ratings
Rating of Telegram channels Rating of Telegram groups Posts rating Ratings of brands and people
API
API statistics Search API of posts API Callback
Our channels
@TGStat @TGStat_Chat @telepulse @TGStatAPI
Read
Академия TGStat Telegram Research 2019 Telegram Research 2021 Telegram Research 2023
Contacts
Справочный центр Support Email Jobs
Miscellaneous
Terms and conditions Privacy policy Public offer
Our bots
@TGStat_Bot @SearcheeBot @TGAlertsBot @tg_analytics_bot @TGStatChatBot