如何下载适用于 opensuse linux 的 python 3.6。
我尝试使用 yum 下载它,但它没有下载,然后我尝试使用 YaST 下载它,它说更改您的 URL。我的系统上已经安装了 Python 2.7.5 版本,还下载了 3.3 版本。
我应该下载到哪个目录。
下载 python3.6 后,我想下载 anaconda,并且需要 3.6 python 版本,那么如何访问 3.6 Python 版本而不是其他版本。
终端上的 Yum 代码:
yum install python
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
tar -xvzf Python-3.5.2.tgz
cd Python-3.5.2
./configure --prefix=/usr/bin
make altinstall
如何在 YaST https 媒体类型中添加存储库:
URL of the repository:https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
Repository name: Python
使用YUM命令出错:在usr/bin目录上我尝试运行python3.6:
mysys:/usr/bin/Python-3.6.0 # python3.6
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.6.0 (default, Feb 1 2018, 10:59:47)
[GCC 4.8.1 20130909 [gcc-4_8-branch revision 202388]] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/etc/pythonstart", line 7, in <module>
import readline
ModuleNotFoundError: No module named 'readline'
在主目录上:
mysys:/home> python3.3
Python 3.3.2 (default, Jun 13 2013, 16:05:31) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[1]+ Stopped python3.3
mysys:/home> python3.6
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python 3.6.0 (default, Feb 1 2018, 10:59:47)
[GCC 4.8.1 20130909 [gcc-4_8-branch revision 202388]] on linux
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/etc/pythonstart", line 7, in <module>
import readline
ModuleNotFoundError: No module named 'readline'
>>>
答案1
贾尼·卡尔胡宁 (Jani Karhunen) 有一个安装python 3.6的过程。
本质上:
确保您的yum
实用程序是最新的:
sudo yum update
sudo yum install yum-utils
sudo yum groupinstall development
安装 IUS 存储库:
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
然后安装python 3.6:
sudo yum install python36u