Python Version Control on ENV

周小董 2019-01-12

PythonVersionControlonENV

OnmyMAC

>brewinstallpyenv

No,inthatcase,wewillnothavepyenv-virtualenv

Trythis

>brewinstall--HEADpyenv-virtualenv

PutthisinmyPATH

exportPATH="$HOME/.pyenv/bin:$PATH"

eval"$(pyenvinit-)"

eval"$(pyenvvirtualenv-init-)"

>pyenv-v

pyenv1.2.9

Install3.6.0inmycase

>pyenvinstall3.6.0

ListtheversionIcanuse

>pyenvversions

*system(setby/Users/hluo/.pyenv/version)

3.6.0

Globallychangetouse3.6.0

>pyenvglobal3.6.0

>python--version

Python3.6.0

Installotherversion

>pyenvinstall3.7.2

Setthisdirectorytousehigherversion

>pyenvlocal3.7.2

>python--version

Python3.7.2

References:

http://einverne.github.io/post/2017/04/pyenv.html

相关推荐