安裝Pipenv
pip install pipenv
出現以下問題,請在環境變量中添加配置
The script virtualenv-clone.exe is installed in 'c:\program files (x86)\python37\Scripts'
which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning...
檢查pipenv是否安裝
pipenv --version
創建虛擬環境指定python版本
在創建虛擬環境之前,要建好需要放虛擬環境的文件夾,並通過命令行進入到該文件路徑
我的系統是安裝的3.7.1,所以選擇three,如果你用的2.7,可以把three換成two
pipenv install --three
激活虛擬環境
1.顯示激活執行命令
pipenv shell
2.不顯示激活執行命令
pipenv run python hello.py
退出虛擬環境
exit