当前位置:首页 > python > 正文内容

Linux之python版本升级

zhangsir3年前 (2023-03-07)python211

四、python3升级步骤

1、下载安装包

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


2、解压软件包

tar -zxvf Python-3.8.8.tgz


3、预编译

注意在编译结束后会有提示"If you want a release build with all stable optimizations active (PGO, etc),please run ./configure --enable-optimizations",加上–enable-optimizations预编译的话后续编译会报错“Could not import runpy module ”,原因是gcc版本太低,enable-optimizations参数要求gcc版本8.1.0以上。

cd Python-3.8.8
./configure


4、编译

make

if test `uname -s` = Darwin; then

cp python-config.py python-config;

fi


5、编译安装

make install

Collecting setuptools

Collecting pip

Installing collected packages: setuptools, pip

Successfully installed pip-18.1 setuptools-40.6.2


6、升级后版本检查

python3 -V

Python 3.8.8


zhangsir版权f8防采集https://mianka.xyz

扫描二维码推送至手机访问。

版权声明:本文由zhangsir or zhangmaam发布,如需转载请注明出处。

本文链接:https://mianka.xyz/post/102.html

分享给朋友:

“Linux之python版本升级” 的相关文章

django框架的安装和创建第一个项目

安装Djangopip install -i https://pypi.douban.com/simple django创建项目django-admin startproject 项目名称例如 django-admin startproje...

使用pyautogui进行屏幕捕捉实现自动化操作

import pyautogui import time # # 获取基本信息 # # 屏幕大小 # size = pyautogui.size() # print(size) #&nbs...

python selenium find_element_by_xpath 方法已经被弃用的解决办法

背景:在使用最新3.10.4Python版本时候,用selenium进行xpath定位元素,编译器提示:DeprecationWarning:find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value...

python selenium 使用代理ip

代码如下:from selenium import webdriver chromeOptions = webdriver.ChromeOptions() chromeOptions.add_argument("--proxy-serv...

Linux系统下使用Python+selenium+谷歌浏览器下载文件

from seleniumwire import webdriver import time ch_options = webdriver.ChromeOptions() ch_options.add_argument("-...

python 使用PIL库进行验证码清晰处理

python 使用PIL库进行验证码清晰处理from PIL import Image import sys import os sys.setrecursionlimit(1000000) pixel_list = []...