python - 使用 yum 安装软件包到 alt python 位置

标签 python python-2.7 rhel rhel6

我目前正在运行 RHEL 6.6。这已经预装了 python 2.6.6 并且是默认的。我使用 altinstall 方法安装了 python 2.7。默认的 python 仍然是 2.6.6。我正在尝试使用仅使用 root 运行的 yum 安装 python-devel 包。但是,当我以 root 身份运行 yum install python-devel 时,它会将软件包安装到 python 2.6.6

有没有办法让 yum 使用 alt python install 安装软件包?

最佳答案

您可能希望使用作为“软件集合”的一部分提供的 Python 2.7 版本。它与原始 2.6 一起安装并且不会尝试替换它(并且几乎包含在所有 RHEL 订阅中。)请在此处查看信息:

简介:http://developers.redhat.com/products/softwarecollections/overview/

可用组件列表,包括 Python 2.7:https://access.redhat.com/documentation/en-US/Red_Hat_Software_Collections/2/html/2.0_Release_Notes/chap-RHSCL.html#sect-RHSCL-Features

它仍然是一个 yum 安装,但有一个或两个额外的命令。您可以从 Python 3.4 入门指南 (http://developers.redhat.com/products/softwarecollections/get-started-rhel6-python/) 开始,但在第 2 步和第 3 步中更换 Python 版本。

关于python - 使用 yum 安装软件包到 alt python 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36750295/

相关文章:

python - GoogleTrans API 错误 - 预期值 : line 1 column 1 (char 0)

python - 如何将声音分配给 Pygame 中的 channel ?

linux - 如何在Linux中的字符串中添加小时?

RPM 规范 %post 不在 rpmbuild 中执行

python - 自动加载子模块时出现 NameError

python - 在 Bash 中安排 Python 脚本?

python - 正则表达式 RE : All but not this pattern

Python 从输出变量中搜索字符串并打印接下来的两行

Python - 如何在 Tkinter 文本小部件中获取光标位置

linux - 用 Gif 替换 MOTD