0

当我想从这里安装包 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 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

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

4

1 回答 1

1

在启动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
************************************************************************

沿着这些思路,这是它在实验 spkgs 列表中所说的,这是其中之一:

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

所以买家要小心!

于 2012-06-27T01:24:24.637 回答