0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【環境構築】venv

Last updated at Posted at 2024-11-29

環境構築

Pythonインストール

Pythonをインストールしていない場合はPython3環境構築でインストールしてください。

作成

作業ディレクトリに移動します。
directory:作成ディレクトリ

cd directory

以下のコードで仮想環境を作成します。
myenv:作成する仮想環境の名前

python3 -m venv myenv

起動

以下のコードで仮想環境を起動します。
myenv:作成した仮想環境の名前

source ./myenv/bin/activate

(myenv)が先頭に表示されれば起動成功です。

終了

deactivate
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?