首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SageMath:运行`make`在dochtml阶段以ImportError结束

SageMath:运行`make`在dochtml阶段以ImportError结束
EN

Stack Overflow用户
提问于 2019-05-25 22:49:43
回答 2查看 186关注 0票数 2

我正在尝试在我的macbook中安装sagemath包。我先输入./configure,然后输入make。下面是最后几行输出。无法调试原因。

代码语言:javascript
复制
[sagelib-8.7] Finished cleaning, time: 0.40 seconds.
[sagelib-8.7] if [ "$UNAME" = "CYGWIN" ]; then                         \
[sagelib-8.7]       sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null;            \
[sagelib-8.7]   fi
[sagelib-8.7] 
[sagelib-8.7] real  19m37.851s
[sagelib-8.7] user  59m16.416s
[sagelib-8.7] sys   2m58.759s
cp /Users/satya/Downloads/SageMath/src/bin/sage-env-config /Users/satya/Downloads/SageMath/local/bin/sage-env-config
cd ../.. && sage-logger -p './sage --docbuild --no-pdf-links all html ' logs/dochtml.log
[dochtml] Traceback (most recent call last):
[dochtml]   File "/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py", line 163, in _run_module_as_main
[dochtml]     mod_name, _Error)
[dochtml]   File "/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py", line 111, in _get_module_details
[dochtml]     __import__(mod_name)  # Do not catch exceptions initializing package
[dochtml]   File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage_setup/docbuild/__init__.py", line 60, in <module>
[dochtml]     import sage.all
[dochtml]   File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/all.py", line 98, in <module>
[dochtml]     from sage.symbolic.all   import *
[dochtml]   File "/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/all.py", line 3, in <module>
[dochtml]     from sage.libs.pynac.pynac import I
[dochtml]   File "sage/symbolic/expression.pxd", line 4, in init sage.libs.pynac.pynac (build/cythonized/sage/libs/pynac/pynac.cpp:30147)
[dochtml]   File "sage/symbolic/expression.pyx", line 161, in init sage.symbolic.expression (build/cythonized/sage/symbolic/expression.cpp:74075)
[dochtml] ImportError: dlopen(/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so, 2): Symbol not found: __ZNSt3__16vectorIN5GiNaC2exENS_9allocatorIS2_EEE11__vallocateEm
[dochtml]   Referenced from: /Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so
[dochtml]   Expected in: flat namespace
[dochtml]  in /Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so
make[3]: *** [doc-html] Error 1
make[2]: *** [all-start] Error 2

real    19m41.468s
user    59m18.862s
sys 3m0.256s
***************************************************************
Error building Sage.

The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

make[1]: *** [all-start] Error 1
make: *** [all] Error 2

任何帮助都将不胜感激。

EN

回答 2

Stack Overflow用户

发布于 2019-05-27 11:58:11

为SageMath运行make分两步进行:先运行make build,然后运行make doc

在您的例子中,make build阶段似乎已经完成,只在make doc阶段出现了问题。这意味着您可能已经有了一个功能性SageMath,但存在文档无法构建的缺点。因此,您可能决定尝试按原样使用它。

关注@John Palmieri,我建议发布到sage-devel或sage-support,以获得调试make失败的帮助。指定发生buid的操作系统(macOS的版本)、buid是从git clone获得的目录启动还是从源tarball启动,以及运行的确切操作顺序将非常有用。

此外,在您下次尝试时,您可能希望在运行make之前将SageMath文件夹移出Downloads文件夹,因为Sage安装在启动一次之后就无法移动(如果移动了Sage,则必须再次运行make才能使用它)。

票数 1
EN

Stack Overflow用户

发布于 2019-06-18 09:24:04

根据塞缪尔的回答,您可能想要尝试的另一件事是简单地运行make doc-clean,然后再次运行make doc。我发现(在Mac上)有时会有一个奇怪的打饱眼,我永远也找不到,而这通常会过去。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56305895

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档