鏈枃鐢ㄤ簬璁板綍python瀛︿範涓惌寤鸿櫄鎷熺幆澧
棣栧厛涓嬭浇濂絧ython2鍜宲ython3
pip install virtualenv
濡傛灉python瀹夎涓瘮杈冩參鐨勮瘽锛屽彲浠ヤ娇鐢ㄨ眴鐡f簮锛屽嵆
pip install -p https://pypi.douban.com/simple virtualenv
鐒跺悗浣跨敤
virtualenv test(椤圭洰鍚嶅瓧)
灏卞垱寤烘垚鍔熶簡 鐒跺悗鍒癝CRIPTS搴曚笅鐨勮繍琛宎ctivate.bat灏卞彲浠ヤ簡
閫鍑虹殑璇濆氨杩愯deactivate.bat
涓婇潰鎸囩殑鏄粯璁や笅python涓2.7鐨勬儏鍐碉紝濡傛灉鐢佃剳瀹夎浜3.6鐨勭増鏈紝閭d箞灏辨槸
virtualenv -p python3鐨刾ython.exe鐨勮矾寰 椤圭洰鍚嶅瓧
涓婇潰璁茬殑鏄湪window搴曚笅鐨勫畨瑁咃紝鎺ヤ笅鏉ヨ鐨勬槸鍦╨inux搴曚笅鐨勫畨瑁
棣栧厛瀹夎virtualenv
sudo apt-get install python-virtualenv
鍒涘缓椤圭洰鐨勬柟娉曟槸涓鏍风殑锛宭inux搴曚笅杩涘叆鐨勬槸bin鐩綍
鎼缓铏氭嫙鐜杩樻湁鍙﹀涓涓緢鏂逛究鐨勶紝鍙仛virtualenvwrapper,瀹夎涔熸槸鍚屾牱
pip install virtualenvwrapper-win
瀹夎瀹屽叏鍚庣湅涓涓嬩綘鏈変粈涔堣櫄鎷熺幆澧
鐢╳orkon 鍙兘闇瑕侀厤缃竴涓嬫湰鍦扮殑绯荤粺鐜锛岄粯璁ゆ槸鍦–鐩樺簳涓嬬殑envs
閭d箞閰嶇疆涓篧ORKON_HOME E:\Envs 鐜板湪鐨剋orkon灏辨寚鍚戝埌E鐩
鐜板湪鎼缓灏变负
mkvirtualenv 椤圭洰鍚嶇О
閫鍑虹殑鏂瑰紡鍜寁irtualenv涓鏍
deactivate
瀹夎杩囩▼涓鏋滃皯浜嗕粈涔堜緷璧栵紝鍙互鍒拌繖涓綉绔欎笂涓嬭浇
http://www.lfd.uci.edu/~gohlke/pythonlibs/
濡傛灉瑕佸畨瑁卲ython3鐨勮櫄鎷熺幆澧,灏辨槸
mkvirtualenv --python=c:\python3鐨勮矾寰刓python.exe py3(椤圭洰鍚嶇О)
linux搴曚笅鐨勬槸缂栬緫
vim ~/.bashrc
export WORKON_HOME=$HOME/ .virtualenv
鍏朵粬鐨勯兘宸笉澶 灏辫繖鏍峰惂
鍙戣〃鍥炲