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



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

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

您需要在启动 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 列表中所说的内容,这是其中之一:

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

所以买家要当心!

最新更新