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

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

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

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Ubuntu

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

Q&A

解決済

1回答

2671閲覧

wxpythonのインストールができないです

mmmisaki

総合スコア34

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Ubuntu

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

0グッド

0クリップ

投稿2017/11/08 14:37

###前提・実現したいこと
wxpythonをインストールしたいです
エラーが全く読めないのでなにすればいいのか全く分からないです

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

Perhaps you should add the directory containing `gtk+-3.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-3.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found no *** Could not run GTK+ test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed. configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. Error running configure ERROR: failed building wxWidgets Traceback (most recent call last): File "build.py", line 1269, in cmd_build_wx wxbuild.main(wxDir(), build_options) File "/tmp/pip-build-o3knvq_0/wxpython/buildtools/build_wxwidgets.py", line 376, in main "Error running configure") File "/tmp/pip-build-o3knvq_0/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError raise builder.BuildError(msg) buildtools.builder.BuildError: Error running configure Finished command: build_wx (0m2.498s) Finished command: build (0m2.498s) Command '"/home/misaki/anaconda3/bin/python" -u build.py build' failed with exit code 1. ---------------------------------------- Command "/home/misaki/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-o3knvq_0/wxpython/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-1rkgjzmi-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-o3knvq_0/wxpython/

###該当のソースコード

ここにご自身が実行したソースコードを書いてください

###試したこと
pip install wxpythonやwxpythonのwebページから直接インストールしてもできませんでした。not found gtk+-3.0と書いてあったのでgtkのバージョン確認しましたがすでにあるようになのでエラーが何言いたいのかさっぱりわからないです。

###補足情報(言語/FW/ツール等のバージョンなど)
ubuntu16.4 anaconda4.4.0 python3.6.1

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

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

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

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

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

guest

回答1

0

ベストアンサー

ubuntu(に限らず、大抵のlinuxディストリビューション)では、「ライブラリの実行に必要なパッケージ」と「ライブラリのビルドに必要なパッケージ」とが分かれており、「ビルドに必要なパッケージ」は自分で入れない限りインストールされていません。

具体的にgtk+3に関しては、「libgtk-3-0」と「libgtk-3-dev」とがありますが(あと「-bin」「-doc」もありますが、置いといて)、おそらく「libgtk-3-dev」がインストールされていません。
「apt-get install libgtk-3-dev」を実行してインストールしてください。

(自分はLinuxMint18.2を使っているので、それで確認しています。ubuntu16.04とはパッケージ名が違っているかもしれませんので、ご注意ください。多分同じだと思いますが、念の為)

投稿2017/11/08 15:36

katsuko

総合スコア3469

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

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

mmmisaki

2017/11/09 08:58

教えていただいたことを試してパケージはインストールできたのですがそのあとものすごい長いエラーが出てしまいました。 長くてすべて記述できないので恐らくエラーの原因はここではないかという部分を以下に持っていました 調べるとlibwebkit-devをインストールすると解決できるそうなのですがインストールしても以下のエラーが出てきます どうすればよいでしょうか? [633/862] cxx: sip/cpp/sip_html2cmodule.cpp -> build/waf/3.6/gtk3/sip/cpp/sip_html2cmodule.cpp.17.o ../../../../sip/cpp/sip_html2cmodule.cpp:391:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type ::wxWebView* sipVH__html2_23(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::wxWindow*parent, ::wxWindowID id,const ::wxString& url,const ::wxPoint& pos,const ::wxSize& size,long style,const ::wxString& name) ^
katsuko

2017/11/09 15:33

wxPythonもwxWidgetsもwebkitもanacondaも使った事がないので、ここからは憶測になります。 とりあえず「apt-get search webkit」でwebkit関連のパッケージを探してみてください。 今回はGtk+3を使っているので、必要なので「libwebkit-dev」ではなく「libwebkitgtk-3.0-dev」のような気がします。(あくまで憶測です)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問