linux 安装 Python3.7.6

1、下载

 

wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz

tar -zxvf Python-3.7.6.tgz

2、安装

  (1)、建立存放python3对的文件夹: mkdir /usr/local/python376

(2)、执行配置文件,编译,编译安装

      cd Python-3.7.6

      ./configure --prefix=/usr/local/python37

      make && make install

3、创建软连接

    ln -s /usr/local/python37/bin/python3.7 /usr/bin/python37

    ln -s /usr/local/python37/bin/pip3.7 /usr/bin/pip37

4、验证

[root@emr-header-1 Python-3.7.6]# python37 
Python 3.7.6 (default, Aug 20 2020, 16:28:57) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello world!')
hello world!
>>> exit()

 

安装anaconda3

参考:https://www.ivdone.top/article/1034.html

https://repo.anaconda.com/archive/

 

/mnt/disk1/apps/anaconda3

linux 安装 Python3.7.6_第1张图片

你可能感兴趣的:(python)