29
18

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 5 years have passed since last update.

pipenv installが上手く行かなかった際にやったこと

Last updated at Posted at 2018-10-07

既存のPipfileを用いてpipenv installを実行した際、以下のようなエラーが発生した。

実行環境は以下の通りである。

  • python, 3.6.5(pyenv)
  • pipenv, version 2018.7.1
> pipenv install
Pipfile.lock (ca72e7) out of date, updating to (c2d5f0)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
python3.6/site-packages/pipenv/utils.py", line 402, in resolve_deps
    req_dir=req_dir
  File "/Users/kosuke-f/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
    req = Requirement.from_line(dep)
  File "/Users/kosuke-f/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
    line, extras = _strip_extras(line) TypeError: 'module' object is not callable 

pipenvの公式repositoryのissueによると、どうやらpipの最新versionである18.1が未対応らしい。

pipのバージョンを確認してみる。

pip --version  
pip 18.1 from /Users/kosuke-f/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip (python 3.6)

pipのversionが18.1だった。
version18.0まで対応しているようなので、pipのversionを18.0にdowngradeする。

pip install `pip==18.0`

もう一度pipenv installを試してみる。

> pipenv install
Pipfile.lock (ca72e7) out of date, updating to (c2d5f0)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Installing dependencies from Pipfile.lock (c2d5f0)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 58/58 — 00:02:05

上手くいきました。
pipenvがpip==18.1に対応するまでは、pip==18.0を用いるしか無いようです。

29
18
1

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
29
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?