在Sage上安装wxPython的spkg包时出现语法错误

在Sage上安装wxPython的spkg包时出现语法错误,python,wxpython,sage,Python,Wxpython,Sage,当我想从安装包wxPython-2.8.7.1.spkg时 在Sage的终端中,它给了我一个语法错误。我在Sage终端中写的内容和结果如下: sage: sage -i wxPython-2.8.7.1.spkg ------------------------------------------------------------ File "<ipython console>", line 1 sage -i wxPython-RealNumber('2.8').

当我想从安装包wxPython-2.8.7.1.spkg时

在Sage的终端中,它给了我一个语法错误。我在Sage终端中写的内容和结果如下:

sage: sage -i wxPython-2.8.7.1.spkg
------------------------------------------------------------
   File "<ipython console>", line 1
     sage -i wxPython-RealNumber('2.8').gen(7).1.spkg
                    ^
SyntaxError: invalid syntax
sage:sage-i wxPython-2.8.7.1.spkg
------------------------------------------------------------
文件“”,第1行
sage-i wxPython实数('2.8')。gen(7)。1.spkg
^
SyntaxError:无效语法
我也使用包裹的直接地址,但结果相同:

 sage: sage -i http://www.sagemath.org/packages/experimental/wxPython-2.8.7.1.s>
------------------------------------------------------------
   File "<ipython console>", line 1
     sage -i http://www.sagemath.org/packages/experimental/wxPython-RealNumber('2.8').gen(7).1.spkg
                ^
SyntaxError: invalid syntax
sage:sage-ihttp://www.sagemath.org/packages/experimental/wxPython-2.8.7.1.s>
------------------------------------------------------------
文件“”,第1行
鼠尾草ihttp://www.sagemath.org/packages/experimental/wxPython-RealNumber('2.8')。gen(7)。1.spkg
^
SyntaxError:无效语法

我还下载了软件包并使用了本地地址,但结果是一样的。

在启动Sage之前,您需要从命令行执行此操作。否则,您可以使用

sage: install_package("wxPython")
目前正在为我下载。。。然后失败了:

checking for GTK+ - version >= 2.0.0... 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 configure wx widgets.

real    0m13.972s
user    0m2.791s
sys 0m5.232s
************************************************************************
Error installing package wxPython-2.8.7.1
************************************************************************
沿着这些思路,这里是它在上所说的,这是其中之一:

这些都是实验性的!他们可能根本不适合你!使用风险自负!其中许多从未在任何平台上成功构建过


所以买家要当心

虽然在这种情况下,它确实为您提供了一些如何修复它的想法。“可选”SPKG应可在所有受支持的平台上正常安装。