Reference Document: Http://www.it165.net/pro/html/201405/13603.html
Brief introduction:
Pyenv can help you build multiple versions of the Python environment on a single development machine and provide a convenient way to switch
VirtualenvVirtualenv provides a sandbox mechanism, which is to set up a directory as a virtual Python environment, so that users can build multiple virtual environments, the Python version of each environment can be different, or can be the same, And the environment is independent of each other.
Everything went well and encountered a few minor problems, recorded under:
See if this machine is already installed Virualenv
~/.pyenv/bin/pyenv Insufficient permissions
Add ~/.pyenv/bin/pyenv executable permissions, or you will be prompted
$HOME/.pyenv/bin/pyenv: Insufficient Authority
3.source ~/.bash_profile.
Tips
.. /libexec/pyenv: No file or directory
I looked at the directory structure and found that this file really exists.
So I modified the $home/.pyenv/bin/pyenv file
./libexec/pyenv
Run again
SOURCE ~/.bash_profile
Success!
Python builds a multi-version environment--pyenv, virtualenv toss notes