1
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?

pythonのローカル環境構築まとめ

Posted at

この記事はPythonで自分で理解するためのもので記述しているので読みやすさは考えずメモ形式で書いております。

このPCの開発環境

  • Windows
  • GPUあり

venv構築

  • venvとはpython3.3以降に組み込まれている基本的なモジュール。同じバージョンの仮想環境を構築可能
  • 仮想環境の作成
python -m venv {プロジェクトの名前}
  • 仮想環境のアクティベート
{プロジェクト名}\Scripts\activate
  • 環境内での作業
python ファイル名
pip install ライブラリ名
  • 仮想環境の終了
deactive

miniconda

anacondaの公式サイトからコマンドまたはインストール

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe --output .\Downloads\Miniconda3-latest-Windows-x86_64.exe
  • 仮想環境の作成
conda creat --name {プロジェクト名} python=3.x
  • 仮想環境のアクティベート
conda activate {プロジェクト名}
  • 仮想環境の無効
conda deactivatw
  • コマンドリスト
- conda env list 作成した環境一覧
- conda list インストールパッケージ一覧
- conda remove -n [name]--all 作成した仮想環境の削除

普段、anacondaでローカルでは検証してこなかったので一旦2つに絞ってまとめた。
また思いついたら追記する。

1
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
1
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?