LoginSignup
2
0

More than 3 years have passed since last update.

pipが最新だとうまくいかない時がある話

Last updated at Posted at 2020-05-18

NLGEvalという自然言語生成の評価指標のためのpython frameworkをpipで入れようとした時、以下のエラーが出た。

ERROR: Command errored out with exit status 1:
     command: /hoge -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1_dfztb4/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-1_dfztb4/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-02126d0b
         cwd: /tmp/pip-req-build-1_dfztb4/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-1_dfztb4/setup.py", line 24, in <module>
        reqs = [str(ir.req) for ir in install_reqs]
      File "/tmp/pip-req-build-1_dfztb4/setup.py", line 24, in <listcomp>
        reqs = [str(ir.req) for ir in install_reqs]
    AttributeError: 'ParsedRequirement' object has no attribute 'req'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

エラー文でぐぐると、似たようなエラーが違うフレームワークのインストール時に起きていることがわかり、そこではpipを20.1から19.3.1に戻すとうまくいくと書いてあった。
https://github.com/ansible/awx/issues/6870#issuecomment-620979872

素直にしたがって19.3.1に直すと無事うまくいった。

pip install pip==19.3.1

pipをダウングレードしたのは初めてだ。。。

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