ubuntu中如何安装python3.6

此处使用命令行方式来安装Python3.6:

  1. sudo wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz 
  2. sudo tar xJf Python-3.6.0.tar.xz
  3. sudo cd Python-3.6.0 
  4. sudo ./configure 
  5. sudo make && make install 

检查是否安装成功,运行以下命令:

#which python3

输出:#/usr/local/bin/python3

#python3 -V

输出:Python 3.6.0

对于permission denied解决方法:

sudo chmod a+x /xxx/xxx

Then try to clean the make and do it again:
sudo make clean

sudo ./configure

sudo make && make install

怕什么真理无穷,进一寸有一寸的欢喜。---胡适
原文地址:https://www.cnblogs.com/hujianglang/p/7787375.html