当前位置:首页 - Python

安装python3报错 make: *** [profile-opt] Error 2

作者:高景洋 日期:2023-04-25 21:18:23 浏览次数:816
1、yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make 安装依赖
2、下载python https://www.python.org/ftp/python/ 找到自己合适的版本
3、解压python到指定目录并进入解压出来的目录 tar zxf Python-3.8.0.tgz
4、./configure prefix=/usr/local/python3 注意不要加 --enable-optimizations
5、make clean 清空缓存 (重要)
6、make && make install
7、添加软链接
ln -s /usr/local/python3/bin/python3.8 /usr/local/bin/python3.8
ln -s /usr/local/python3/bin/pip3.8 /usr/local/bin/pip3.8

8、输入python3.8即可


本文永久性链接:
<a href="http://r4.com.cn/art229.aspx">安装python3报错 make: *** [profile-opt] Error 2</a>
当前header:Host: r4.com.cn X-Host1: r4.com.cn X-Host2: r4.com.cn X-Host3: 127.0.0.1:8080 X-Forwarded-For: 44.210.83.132 X-Real-Ip: 44.210.83.132 X-Domain: r4.com.cn X-Request: GET /art229.aspx HTTP/1.1 X-Request-Uri: /art229.aspx Connection: close User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 If-Modified-Since: Mon, 02 Oct 2023 09:06:28 GMT Accept-Encoding: br,gzip