3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

pipenvでパッチバージョンまで指定する

Posted at

pipenv --python 3.7.2 などとしてパッチバージョンまで含めてpipenvの仮想環境を作っても,
Pipfile に入るPython指定バージョンはマイナーバージョンまで. 「3.7」までしか入りません.

% cat Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]

[requires]
python_version = "3.7"

このPipfileから環境を再現しても, 3.7.2の仮想環境が作られることは保証されません.

そこで Pipfileのなかの python_version = "3.7"python_full_version = "3.7.2 に置き換えてやると, パッチバージョンまで含む仮想環境を再現できるようになります 1.

普段使いでここまで細かいバージョンを問題にすることはあまりないですが, 実務においてはちょっと気になる話でした.

  1. python_versionpython_full_version を同時に指定するとエラーになる

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?