【pip】ライブラリのインストール時に「note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error」でインストールに失敗する場合の対処法[Python]
【pip】ライブラリのインストール時に「note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error」でインストールに失敗する場合の対処法[Python]
ちなみにタイトルにある様に「note: This error originates from a subprocess, and is likely not a problem with pip.」という注意書きもあり、「pipの問題ではないようで、subprocessから発生した問題である」ということも問題をややこしくしていました。
対処法
まずこの問題が発生した時の状況はこんな感じでした。
pip install opticspy
実行結果
Collecting opticspy
Using cached opticspy-0.2.1.tar.gz (1.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.9.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from opticspy) (1.26.4)
Requirement already satisfied: matplotlib>=1.4.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from opticspy) (3.9.2)
Collecting unwrap (from opticspy)
Using cached unwrap-0.1.1.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [2 lines of output]
Error: CFFI (required for setup) is not available.
Please use "pip install cffi", or equivalent.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
コメント