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?

Python環境構築メモ

Posted at

Python環境構築メモ

pyenv

# イントールできるバージョンの確認
pyenv install --list

# インストール(ここでは3.13.2を指定)
pyenv install 3.13.2

# インストールされたバージョンの確認
pyenv versions

# バージョンの指定
# システム全体
pyenv global <version>
# 特定のディレクトリ
pyenv local <version>

venv

# 仮想環境作成
python -m venv .venv

# 仮想環境活性化
source .venv/bin/activate

# 仮想環境化確認
which python

# 仮想環境非活性化
deactivate

pip

# pip 準備
python -m pip install --upgrade pip
python -m pip --version

# パッケージインストール
python -m pip install requests

# バージョン指定
python -m pip install 'requests==2.18.4'

# バージョン範囲指定
python -m pip install 'requests>=2.0.0,<3.0.0'

# パッケージ更新
python -m pip install --upgrade requests

# requirements.txt使用
python -m pip install -r requirements.txt

# requirements.txtに出力
python -m pip freeze > requirements.txt
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?