Python 3.7 编译安装教程
Tofloor
poster avatar
hetern
deepin
2018-07-09 23:26
Author
本帖最后由 hetern 于 2018-7-9 16:04 编辑

1.安装依赖包

sudo apt-get install build-essential
sudo apt-get install libncursesw5-dev libreadline-dev
sudo apt-get install libgdbm-dev libsqlite3-dev libssl-dev
sudo apt-get install libbz2-dev  liblzma-dev tk-dev uuid-dev
sudo apt-get install libffi-dev


2.下载Python源代码编译安装

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar -xvf Python-3.7.0.tar.xz
cd Python-3.7.0
./configure
make
sudo make install


Reply Favorite View the author
All Replies
avatar
sinux
deepin
2018-07-09 23:40
#1
你这是在作,建议别作
Reply View the author
avatar
187******09
deepin
2018-07-10 00:00
#2
你需要
  1. ./configure --prefix=/usr/local/python3/
Copy the Code
类似指定安装路径
Reply View the author
avatar
hetern
deepin
2018-07-10 00:01
#3
还好吧,相当于多了一个选择,原来的还在。
Reply View the author
avatar
hetern
deepin
2018-07-10 00:06
#4
本帖最后由 hetern 于 2018-7-15 12:07 编辑
https://bbs.deepin.org/post/166121
你需要类似指定安装路径

不指定文件夹的话,会安装在/usr/local/lib/python3.7
Reply View the author
avatar
187******09
deepin
2018-07-10 00:24
#5
https://bbs.deepin.org/post/166121
指定了文件夹,不会覆盖原来的Python版本?

en,否则可能出现依赖问题,安装过程中可能还会出现提示是否进行完整安装(大体这个意思),选n
Reply View the author
avatar
hetern
deepin
2018-07-10 09:36
#6
我在make的时候会看到依赖的库都安装没,所以编译前才安装那么多的库
Reply View the author