Created
January 7, 2020 04:19
-
-
Save terashim/d14115b9a9edfe89a60f64520bc2dfb7 to your computer and use it in GitHub Desktop.
Mac OS に Python 3.8 をインストールして venv 環境を作成する例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Mac OS に Python 3.8 をインストールして venv 環境を作成する例 | |
| # Homebrew で Python 3.8 を取得 | |
| brew install python@3.8 | |
| # $HOME/.venv/3.8 にPython 3.8 用の venv フォルダを作成 | |
| # (プロジェクトごとにvenv環境を分離したい場合は, 別フォルダを作成する) | |
| /usr/local/opt/python@3.8/bin/python3 -m venv $HOME/.venv/3.8 | |
| # 用法 | |
| # | |
| # 例: fishシェルでPython 3.8環境を有効化するとき | |
| # source $HOME/.venv/3.8/bin/activate.fish | |
| # (デフォルトで有効にしたい場合は ~/.config/fish/config.fish に記述する) | |
| # | |
| # 一度有効化したvenv環境を無効化するとき | |
| # deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment