Mac OS上安装gevent的时候遇到点麻烦,看到网上有这样的东西,先看看python homebrew,值得注意的是这个包已经不再维护了。
curl -kL http://xrl.us/pythonbrewinstall | bash
再把下面这个添加到~/.bash_profile
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
有意思的是在我的~/.bash_profile里面还有一个
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
pythonbrew list --knowpythonbrew install 2.7.3pythonbrew uninstall 2.7.3pythonbrew list就不再copy了,这是一个不再维护的包。上面推荐了一个pyenv
用的自然是brew
brew update
brew install pyenv
问题是python的版本会有ruby那么混乱么?
试试
pyenv --help
于是就有了
commands List all available pyenv commandslocal Set or show the local application-specific Python versionglobal Set or show the global Python versionshell Set or show the shell-specific Python versioninstall Install a Python version using python-builduninstall Uninstall a specific Python versionrehash Rehash pyenv shims (run this after installing executables)version Show the current Python version and its originversions List all Python versions available to pyenvwhich Display the full path to an executablewhence List all Python versions that contain the given executablepython需要版本管理么?
围观我的Github Idea墙, 也许,你会遇到心仪的项目