LoginSignup
2
1

More than 5 years have passed since last update.

pipenv でパッケージを条件つけてインストール

Posted at

特定の環境下でのみパッケージをインストールしたい

例えば pillow を linux でのみインストールしたいときは下記のように記述する

[package]
requests = "*"
pillow = {version = "*", sys_platform = "== 'linux'"}

条件は複数指定することができる

pillow = {version = "*", markers="sys_platform == 'linux' or python_version > '3.4'"}

指定できる項目はこちら
https://www.python.org/dev/peps/pep-0508/#id23

参考

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