0
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.

pkg_resources.VersionConflictエラー対処法

Posted at

pipenvでパッケージをインストールしたときにResolving dependencies...が終わらず、✘ Locking Failed! とでて、最終的にpkg_resources.VersionConflictのエラーが出る場合の対処法

今回は、pipenv install pyyamlを実行しておこった。

エラー文では
以下のようになっていたのでパッケージ同士の依存関係でエラーが起こっているよう

importlib-metadata<3,>=0.12; python_version < "3.8"')

$ pipenv install hogehoge
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed! 
...

(中略)

...
pkg_resources.VersionConflict: (importlib-metadata 3.10.0 (..., Requirement.parse('importlib-metadata<3,>=0.12; python_version < "3.8"'))

解決法

Lockファイルを作成する時点でエラーが起きているので、--skip-lockオプションをつけて以下のようにする

$ pipenv uninstall importlib-metadata --skip-lock
$ pipenv install myyaml

この解決方法でとりあえず大丈夫だったのですが、正解かどうかは不明

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