2015-04-01 60 views
0

當嘗試構建時,出現以下錯誤。 我截斷了所有錯誤,沒有找到包含文件。 我錯過了什麼?無法在CenOS 6上構建wxPython 2.8.12.1

python setup.py build 
WARNING: WXWIN not set in environment. Assuming '..' 
Found wx-config: /usr/local/bin/wx-config 
    Using flags: --toolkit=gtk2 --unicode=yes --version=2.8 
Preparing CORE... 
Preparing GLCANVAS... 
Preparing STC... 
running build 
running build_py 
copying wx/__version__.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx 
copying wx/build/build_options.py -> build-gtk2.unicode/lib.linux-x86_64-2.6/wx/build 
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file) 
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file) 
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file) 
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file) 
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file) 
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file) 
running build_ext 
building '_stc' extension 
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.6 -c contrib/stc/gtk/stc_wrap.cpp -o build-gtk2.unicode/temp.linux-x86_64-2.6/contrib/stc/gtk/stc_wrap.o -pthread -O3 -pthread 
contrib/stc/gtk/stc_wrap.cpp:2680:24: error: wx/stc/stc.h: No such file or directory 

回答

1

我在這裏找到了一個好的開始。 http://wxpython.org/BUILD-2.8.html 我沒有WXDIR變量。當我試圖從bld目錄運行時,它不起作用。所以我從源碼目錄再次嘗試。我的配置線要簡單得多。

./configure --with-gtk --enable-unicode 

我以前不明白的關鍵是如果我想要stc。我需要分別進行編譯和安裝。

make 
make -C contrib/src/stc 
sudo make install 
sudo make -C contrib/src/stc install 

筆者與

make $* \ 
    && make -C contrib/src/stc $* 

作品。使文件也很好。

記得還運行

sudo ldconfig 

如果需要其他的contrib的東西,看在什麼是可用的contrib/src目錄。

然後cd到wxPython目錄。標準

python setup.py build 
python setup.py install 

似乎工作。

畢竟,我仍然需要將我的LD_LIBRARY_PATH設置爲/ usr/local/lib。然後,我可以運行我一直試圖安裝的應用程序,這是一個機器人框架的GUI編輯器。

+0

非常感謝。保存了我的一天。這是非常糟糕的記錄,但它是在標準操作系統(Debian)上安裝非常標準的應用程序(Robot Framework)所需的路徑。 – takumar 2016-07-07 12:02:34

0

本練習的要點是在CenOS 6上的wxPython 2.8.12.1。我無法找到可安裝的二進制文件。在我構建項目之後,我找到了一個可以接受的二進制文件。我希望http://www.wxpython.org/也指向這個位置。 Enterprise Linux的額外軟件包(EPEL)有這個項目和其他的在這裏:https://fedoraproject.org/wiki/EPEL。 安裝它們一個簡單的方法是:

# yum install epel-release 
# yum install wxPython 

首先增加了EPEL釋放到你的yum庫。第二個安裝wxPython。 wxPython網站上的二進制文件需要不同的gcc共享庫。使用這個存儲庫確保匹配。