current position:Home>How to upgrade python? python3 version and install pip3

How to upgrade python? python3 version and install pip3

2022-08-06 03:31:55test zaza

第一步,登录官网下载安装包.

Python的官网是Welcome to Python.org,After logging in, place the mouse overDownloads菜单上,You can see the submenus listed below for the different operating systems,You can choose according to your operating system,我们这里选Windows.Of course, it is also provided directly next to the submenuWindows下Python3.10.6版本的下载链接,If you want to use this version, you can click and download directly.We click here in the submenuWindows,Find what we want to downloadPython哪个版本.

Python Releases for Windows

步骤:

1、自定义编译安装python3.x版本

tar Jxf Python-3.5.2.tar.xz
cd Python-3.5.2
./configure --prefix=/usr/local/Python3
make && make install

2、安装pip3.x,The installation will prompt you tosetuptools模块,所以需要先安装setuptools模块

tar zxf pip-8.1.2.tar.gz
tar zxf setuptools-24.0.2.zip
cd setuptools-24.0.2  
ln -s /usr/local/Python/bin/python3 /usr/bin/python3
python3 setup.py install
cd ..
cd pip-8.1.2
python3 setup.py install
ln -s /usr/local/Python3/bin/pip3 /usr/bin/pip3

3、Verify that the module is installed properly

python3 -m pip list
 
decorator (4.0.10)
ipython (4.2.1)
ipython-genutils (0.1.0)
pexpect (4.2.0)
pickleshare (0.7.2)
pip (8.1.2)
ptyprocess (0.5.1)
setuptools (24.0.2)
simplegeneric (0.8.1)
traitlets (4.2.2)

4、安装ipython

python3 -m pip install ipython
ln -s /usr/local/Python3/bin/ipython3 /usr/bin/ipython3

5、遇到的问题

a. 安装pip3的时候提示没有zlib模块

yum install -y zlib-devel
./configure; echo $? ; make && make install

b. 使用pip3的时候提示没有HTTPSHandler模块,提示信息如下,

ImportError: cannot import name 'HTTPSHandler

yum install -y openssl-devel

然后再重新编译安装python3就可以了,It can be used directly after installationpip3了,No need to recompile and installpip3.

 


python大数据方向

2022最新大数据Hadoop入门视频教程,最适合零基础自学的大数据Hadoop教程
2022年大数据spark3.2入门Spark全套视频教程,4天spark3.2快速入门到精通,全网首套基于Python语言的spark教程
2022年MySQL基础入门2022最新MySQL知识精讲+mysql实战案例_零基础mysql数据库入门到高级全套教程

Python+大数据开发
MySQL数据库:2022最新MySQL知识精讲+mysql实战案例_零基础mysql数据库入门到高级全套教程
Hadoop入门:2022最新大数据Hadoop入门视频教程,最适合零基础自学的大数据Hadoop教程
Hive数仓项目:大数据项目实战教程_大数据企业级离线数据仓库,在线教育项目实战(Hive数仓项目完整流程)

PB内存计算
Python入门:全套Python教程_Python基础入门视频教程,零基础小白自学Python必备教程
Python编程进阶:Python高级语法进阶教程_python多任务及网络编程,从零搭建网站全套教程
spark3.2从基础到精通:Spark全套视频教程,4天spark3.2快速入门到精通,全网首套基于Python语言的spark教程
Hive+Spark离线数仓工业项目实战:全网首次披露大数据Spark离线数仓工业项目实战,Hive+Spark构建企业级大数据平台

copyright notice
author[test zaza],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/218/202208060321495362.html

Random recommended