【发布时间】:2014-12-10 13:12:53
【问题描述】:
以下过程失败。我错过了什么吗?
- 安装各种 Ubuntu 软件包(编译的先决条件)
- 获取http://downloads.sourceforge.net/wxpython/wxPython-src-3.0.1.1.tar.bz2
- 解压到
wxPython-src-3.0.1.1/ - 创建名为
test的新虚拟环境 - 激活
testvirtualenv -
在终端,来自
wxPython-src-3.0.1.1/:./configure --prefix=/home/username/.virtualenvs/test --with-gtk2 --enable-unicode --with-opengl #lots of output, confirms "Configured wxWidgets 3.0.1 for `x86_64-unknown-linux-gnu'" make install #lots of output, confirms: # The installation of wxWidgets is finished. On certain # platforms (e.g. Linux) you'll now have to run ldconfig # if you installed a shared library and also modify the # LD_LIBRARY_PATH (or equivalent) environment variable. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.virtualenvs/test/lib # don't run ldconfig since that is a system tool, not appropriate for virtualenv? cd wxPython python setup.py install # lots of output, starting: # WARNING: WXWIN not set in environment. Assuming '..' # Found wx-config: /home/username/.virtualenvs/test/bin/wx-config # Using flags: --toolkit=gtk2 --unicode=yes --version=3.0 # Preparing CORE... # Preparing STC... # Preparing GLCANVAS... # Preparing GIZMOS... # running install # etc
最终命令失败:
src/gtk/_core_wrap.cpp:20407:7: note: ‘arg3’ was declared here
int arg3 ;
^
src/gtk/_core_wrap.cpp: In function ‘PyObject* _wrap_Image_SetAlphaBuffer(PyObject*, PyObject*, PyObject*)’:
src/gtk/_core_wrap.cpp:3747:13: warning: ‘arg3’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (ALPHASIZE != self->GetWidth() * self->GetHeight()) {
^
src/gtk/_core_wrap.cpp:20474:7: note: ‘arg3’ was declared here
int arg3 ;
^
cc1plus: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
【问题讨论】:
-
发现类似的问题不是完全一样的版本/环境不适用 - 试过 stackoverflow.com/a/20170771/236081 没有效果
-
在使用 wxPython 3.0.2.0 的 Debian 8.3 上遇到了同样的问题。接受的答案有效(尽管我不确定这些警告是什么或首先意味着什么)。
标签: python python-2.7 wxpython virtualenv ubuntu-14.10