質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

1回答

6288閲覧

pip install ができない

aiai8976

総合スコア112

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2020/11/03 01:29

前提・実現したいこと

pipのインストールをしようと思っているのですが、以下のようにエラーが出ます。
一部すんなりインストールできるものもあり、何が原因なのかよくわかりません。
わかる方がいましたら、コメントお願いします。

発生している問題・エラーメッセージ

$ pip3 install scp Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting scp Using cached scp-0.13.3-py2.py3-none-any.whl (8.2 kB) Collecting paramiko Using cached paramiko-2.7.2-py2.py3-none-any.whl (206 kB) Collecting bcrypt>=3.1.3 Using cached bcrypt-3.2.0.tar.gz (42 kB) Installing build dependencies ... error ERROR: Command errored out with exit status 1: command: /home/pi/berryconda3/bin/python /home/pi/berryconda3/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-kbmkx4zc/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'setuptools>=40.8.0' wheel 'cffi>=1.1; python_implementation != '"'"'PyPy'"'"'' cwd: None Complete output (141 lines): Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple Collecting setuptools>=40.8.0 Using cached setuptools-50.3.2-py3-none-any.whl (785 kB) Collecting wheel Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB) Collecting cffi>=1.1 Using cached cffi-1.14.3.tar.gz (470 kB) Collecting pycparser Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB) Building wheels for collected packages: cffi Building wheel for cffi (setup.py): started Building wheel for cffi (setup.py): finished with status 'error' ERROR: Command errored out with exit status 1: command: /home/pi/berryconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-yvyxlita cwd: /tmp/pip-install-8oiom2yx/cffi/ Complete output (56 lines): Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/home/pi/berryconda3/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.6/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: そのようなファイルやディレクトリはありません #include <ffi.h> ^~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for cffi Running setup.py clean for cffi Failed to build cffi Installing collected packages: setuptools, wheel, pycparser, cffi Running setup.py install for cffi: started Running setup.py install for cffi: finished with status 'error' ERROR: Command errored out with exit status 1: command: /home/pi/berryconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v_8fcvd_/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-kbmkx4zc/overlay --compile --install-headers /tmp/pip-build-env-kbmkx4zc/overlay/include/python3.6m/cffi cwd: /tmp/pip-install-8oiom2yx/cffi/ Complete output (56 lines): Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable No package 'libffi' found gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/home/pi/berryconda3/include/python3.6m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.6/c/_cffi_backend.o c/_cffi_backend.c:15:10: fatal error: ffi.h: そのようなファイルやディレクトリはありません #include <ffi.h> ^~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /home/pi/berryconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8oiom2yx/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v_8fcvd_/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-kbmkx4zc/overlay --compile --install-headers /tmp/pip-build-env-kbmkx4zc/overlay/include/python3.6m/cffi Check the logs for full command output. ---------------------------------------- ERROR: Command errored out with exit status 1: /home/pi/berryconda3/bin/python /home/pi/berryconda3/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-kbmkx4zc/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- 'setuptools>=40.8.0' wheel 'cffi>=1.1; python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.

補足情報(FW/ツールのバージョンなど)

$ python -V Python 3.6.1
$ pip3 -V pip 20.2.4 from /home/pi/berryconda3/lib/python3.6/site-packages/pip (python 3.6)

OS:raspberry pi os
マシン:ラズパイ4

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

Package libffi was not found in the pkg-config search path.

libffiを入れましょう
ラズパイは持ってないのでパッケージ管理のコマンド知らないけど、例えばubuntuならapt install libffi-dev

投稿2020/11/03 01:36

hentaiman

総合スコア6421

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hentaiman

2020/11/14 01:47

まだ解決出来てないのこれ?これ解決してないならどうやって次のステップ進んでんの?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問