版本管理
Pipenv
目前官方推薦的方式:
https://github.com/pypa/pipenv
PythonBrew
快速切換python版本的工具
安裝
git clone https://github.com/utahta/pythonbrew.git之後在~./zshrc加入(或bashrc)
[[ -s "$HOME/.pythonbrew/etc/bashrc" ]] && source "$HOME/.pythonbrew/etc/bashrc"http://jb-blog.readthedocs.io/en/latest/posts/0001-pybrew-venv-howto.html
使用
pythonbrew use <version>
//關閉
pythonbrew offvirtualenv
在特定專案下使用該python版本
安裝
使用
(以下以使用3.6為範例,記得先在電腦安裝好python3.6)
之後就可以在兩個不同的terminal使用不同python版本
Python3 與 Pip 版本
有時用 pip 安裝模組後執行 python3 卻說找不到模組,可以使用如下安裝
Last updated
Was this helpful?