ubuntu升级python版本到2.7.10

 git clone https://github.com/yyuu/pyenv.git ~/.pyenv
 git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv

Then add

   #   for PyEnv
  export PYENV_ROOT="$HOME/.pyenv"
  export PATH="$HOME/.pyenv/bin:$PATH"
  export PATH="$HOME/.pyenv/shims:$PATH"
  eval "$(pyenv init -)"

to .bash_profile then you can see the python version you want to install or update:

pyenv install --list

want python 2.7.10? you can try:

 pyenv virtualenv 2.7.10

猜你喜欢

转载自blog.csdn.net/hotpotbo/article/details/80571778