Linux installation and install the package under Python3.6.8

First, the problem
under Linux installation Python3.6.8, due Python in Linux 2.7.x version is therefore, we need to download a new Python in Linux

Second, the solution
1.python installation
(1) Download the package
to use Linux It comes with an installation instruction: [ wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz]
can download the installation package Python3.6.8 by this instruction, may he was named by the rules of downloads of the version number, currently does not do its own testing just think there a possibility.

(2) extracting installation packages
command decompression: [ tar xJf Python-3.6.8.tar.xz]

(3) the terminal mounting.

# $ Cd Python-3.6.8 / 
# $ # ./configure --with-ssl ssl bring pip otherwise there will be error 
# $ the make 
# $ the make install


2.pip installation and configuration
(1). Installation pip

# $ Sudo yum install EPEL-Release 

# then run the following command to install PIP: 

# $ sudo yum install Python-PIP 

# $ sudo yum install Python-Wheel 

# Since the setup-tools available in the default package repository, so you can use the following command to install it: 

# $ sudo yum upgrade Python-setuptools


(2) Upgrading pip
After the installation is complete, you have a python in the pip, and pip3 python3 use to access and manipulate

# (A) the use of "pip install-upgrade pip" command pip version upgrade. 
#         [Xiaokang @ localhost ~] $ sudo install --upgrade PIP PIP 
# (b) the use of "pip install --upgrade setuptools" command setuptools version upgrade. 
#         [Xiaokang @ localhost ~] $ sudo PIP --upgrade install setuptools


(3).安装
【pip install [包名] -i http://pypi.douban.com/simple --trusted-host pypi.douban.com】
的指令安装,用镜像源的速度较快。


(4).补充
有的时候会遇到sqlite3或者是ssl这些库安装错误,就要用如下的方法进行补充安装,每次安装完成后都需要重新编译一下。

# 1 安装 sqlite-devel

# yum install sqlite-devel     # sqlite的
# yum install openssl-devel   # ssl的

# 2 重新编译python

# ./configure
# make
# make install


三、总结
由于第一次接触,还有docker的东西,有点麻烦先记录一下,方便以后的查看。Linux的命令真的多,所以慢慢熟悉吧。遇到问题再继续交流。

四、参考

解压命令:
https://www.jb51.net/LINUXjishu/43356.html

python的安装:
https://blog.csdn.net/weixin_42555131/article/details/87916002

sqlite的安装:
https://blog.csdn.net/qinjiliaoqinmu/article/details/82718742

pip配置:

https://www.linuxidc.com/Linux/2019-07/159364.htm

更新方法:

https://blog.csdn.net/qq_37189082/article/details/97658103






 

Guess you like

Origin www.cnblogs.com/future-dream/p/11401394.html