LoginSignup
4
1

More than 5 years have passed since last update.

pip installの際に依存ライブラリを入れたくない

Posted at

困っていた状況

あるライブラリ(polytester)を導入する必要があるのだが、requirements.txtに記載されている

PyYAML==3.11

がエラーを起こすためにインストールできなかった。コマンドラインから試したところ、最新の3.13なら問題なくインストールできることがわかった。
requirements.txtを書き換えればインストールできるがそれは避けたい。

解決方法

requirements.txtに以下を記載

--install-option --no-deps polytester==1.2.0

--no-depsで依存ライブラリを自動的に取り込まなくなるのでrequirements.txtに以下を追記

PyYAML==3.13
clint==0.4.1
watchdog==0.8.2
4
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
4
1