Skip to content

Instantly share code, notes, and snippets.

@zhangzhiqiangcs
Created June 21, 2016 00:52
Show Gist options
  • Save zhangzhiqiangcs/fcb355629a576b3ecf1b35266c0db8b2 to your computer and use it in GitHub Desktop.
Save zhangzhiqiangcs/fcb355629a576b3ecf1b35266c0db8b2 to your computer and use it in GitHub Desktop.
wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar -xvJf Python-3.5.1.tar.xz
.configure
make
make install
python
此时已经安装python 3.5.1,但是在命令行中输入python的时候还是原来的版本
另一个比较好的解决方法是使用pythonbrew工具
$ python -V
Python 2.6.6
$ curl -kL https://raw.github.com/utahta/pythonbrew/master/pythonbrew-install | bash
$ . $HOME/.pythonbrew/etc/bashrc
$ pythonbrew install 2.7.1
$ pythonbrew switch 2.7.1
Switched to Python-2.7.1
$ python -V
Python 2.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment