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

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

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

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

2852閲覧

pydensecrfがインストールできない(python 3.9.6)

tiroha

総合スコア109

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2021/09/13 08:27

https://github.com/lucasb-eyer/pydensecrf
このサイトでpydensecrfをインストールしたいのですが、エラーが出てきます。
cythonはインストール済みでversion 0.29.24です。
アップグレードも試しましたが、最新ですと表示されます。
$ pip install pydensecrf
も試しましたが、同じようなエラーがでます。
どうすれば、インストールできますか?

Ubuntu

1$ pip install git+https://github.com/lucasb-eyer/pydensecrf.git 2 3Defaulting to user installation because normal site-packages is not writeable 4Collecting git+https://github.com/lucasb-eyer/pydensecrf.git 5 Cloning https://github.com/lucasb-eyer/pydensecrf.git to /tmp/pip-req-build-lok6ey4i 6 Running command git clone -q https://github.com/lucasb-eyer/pydensecrf.git /tmp/pip-req-build-lok6ey4i 7 Resolved https://github.com/lucasb-eyer/pydensecrf.git to commit 0d53acbcf5123d4c88040fe68fbb9805fc5b2fb9 8 Installing build dependencies ... done 9 Getting requirements to build wheel ... done 10 Preparing wheel metadata ... done 11Building wheels for collected packages: pydensecrf 12 Building wheel for pydensecrf (PEP 517) ... error 13 ERROR: Command errored out with exit status 1: 14 command: /usr/bin/python3 /home/nakayama/.local/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp92mz2uv4 15 cwd: /tmp/pip-req-build-lok6ey4i 16 Complete output (18 lines): 17 running bdist_wheel 18 running build 19 running build_py 20 creating build 21 creating build/lib.linux-x86_64-3.9 22 creating build/lib.linux-x86_64-3.9/pydensecrf 23 copying pydensecrf/utils.py -> build/lib.linux-x86_64-3.9/pydensecrf 24 copying pydensecrf/__init__.py -> build/lib.linux-x86_64-3.9/pydensecrf 25 running build_ext 26 building 'pydensecrf.eigen' extension 27 creating build/temp.linux-x86_64-3.9 28 creating build/temp.linux-x86_64-3.9/pydensecrf 29 gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Ipydensecrf/densecrf/include -Ipydensecrf -I/usr/include/python3.9 -c pydensecrf/eigen.cpp -o build/temp.linux-x86_64-3.9/pydensecrf/eigen.o 30 pydensecrf/eigen.cpp:28:10: 致命的エラー: Python.h: そのようなファイルやディレクトリはありません 31 28 | #include "Python.h" 32 | ^~~~~~~~~~ 33 コンパイルを停止しました。 34 error: command '/usr/bin/gcc' failed with exit code 1 35 ---------------------------------------- 36 ERROR: Failed building wheel for pydensecrf 37Failed to build pydensecrf 38ERROR: Could not build wheels for pydensecrf which use PEP 517 and cannot be installed directly 39

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

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

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

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

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

jbpb0

2021/09/13 10:09

> Python.h: そのようなファイルやディレクトリはありません 「Python.h」は、パソコン内のどこかにありますか?
tiroha

2021/09/13 13:07

回答ありがとうございます。 いえ。ないと思います。 研究室のパソコンなので、何とも言えませんが。 google colabで上のコマンドを試した時はエラー文は出ませんでした。
tiroha

2021/09/13 13:32

すいません。ちゃんと調べてません。 今は自宅で、研究室のパソコンをいじれないので、明日以降に調べてみます。 Python.hはpythonをインストール時に一緒にダウンロードされるものですか?それとも新しくダウンロードする必要があるものですか? pipコマンドは使えます。
jbpb0

2021/09/13 13:43

> 新しくダウンロードする必要があるものですか? パソコン内に無ければ、aptで追加する必要があります 私の一つ前のコメントを見てください(コメント書き直しました)
tiroha

2021/09/13 13:48

ありがとうございます。さっそく明日以降試さしていただきます。
tiroha

2021/09/15 05:37

URLまで教えていただきありがとうございました! 無事、コンパイルが通りました!
guest

回答1

0

ベストアンサー

Python.h: そのようなファイルやディレクトリはありません

これ見てください
Python.h: そのようなファイルやディレクトリはありません

投稿2021/09/15 00:06

jbpb0

総合スコア7651

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

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

tiroha

2021/09/15 05:38

ありがとうございました! 無事コンパイルが通りました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問