Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python之pyenv版本控制 #15

Open
hsipeng opened this issue Jul 5, 2017 · 0 comments
Open

python之pyenv版本控制 #15

hsipeng opened this issue Jul 5, 2017 · 0 comments
Labels

Comments

@hsipeng
Copy link
Owner

hsipeng commented Jul 5, 2017

当需要多个python共存时,pyenv提供了解决知道

#####安装pyenv

git clone git://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
exec $SHELL -l

#####用pyenv安装python

查看可安装的版本

 pyenv install --list

#####安装指定版本(3.4.0为例)

 pyenv install 3.4.0 -v

#####安装之后要对数据库进行更新

 pyenv rehash

#####设置全局python版本

pyenv global 3.4.0
@hsipeng hsipeng added the python label Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant