Python SageMath:运行'make'在dochtml阶段以ImportError结束

Python SageMath:运行'make'在dochtml阶段以ImportError结束,python,python-2.7,sage,Python,Python 2.7,Sage,我正在尝试在我的macbook中安装sagemath软件包。我进去了 /configure后接make。这是最后几个 输出行。无法调试原因 [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>

我正在尝试在我的macbook中安装sagemath软件包。我进去了
/configure
后接
make
。这是最后几个 输出行。无法调试原因

[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
[sagelib-8.7]完成清洁,时间:0.40秒。
[sagelib-8.7]如果[“$UNAME”=“CYGWIN”];然后\
[sagelib-8.7]sage-rebase.sh“$sage_LOCAL”2>/dev/null\
[sagelib-8.7]fi
[sagelib-8.7]
[sagelib-8.7]实际19m37.851s
[sagelib-8.7]用户59m16.416s
[sagelib-8.7]系统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--无pdf链接所有html'logs/dochtml.log
[dochtml]回溯(最近一次呼叫最后一次):
[dochtml]文件“/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py”,第163行,作为主模块运行
[dochtml]模块名称,错误)
[dochtml]文件“/Users/satya/Downloads/SageMath/local/lib/python2.7/runpy.py”,第111行,在获取模块详细信息中
[dochtml]uuu导入uuu(mod_名称)#不捕获初始化包时出现的异常
[dochtml]文件“/Users/satya/Downloads/SageMath/local/lib/python2.7/site packages/sage_setup/docbuild/_init__.py”,第60行,在
[dochtml]导入sage.all
[dochtml]文件“/Users/satya/Downloads/SageMath/local/lib/python2.7/site packages/sage/all.py”,第98行,在
[dochtml]来自sage.symbol.all导入*
[dochtml]文件“/Users/satya/Downloads/SageMath/local/lib/python2.7/site packages/sage/symbol/all.py”,第3行,在
[dochtml]来自sage.libs.pynac.pynac导入I
[dochtml]文件“sage/symbol/expression.pxd”,第4行,在init sage.libs.pynac.pynac(build/cythonized/sage/libs/pynac/pynac.cpp:30147)中
[dochtml]文件“sage/symbol/expression.pyx”,第161行,位于init sage.symbol.expression(build/cythonized/sage/symbol/expression.cpp:74075)中
[dochtml]导入错误:dlopen(/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/Symbol/ring.so,2):未找到符号:uuuznst3_uu16;16矢量2像素2_9;allocator2_EE11_uuuuuuvallocateem
[dochtml]引用自:/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbolic/ring.so
[dochtml]应位于:平面命名空间中
[dochtml]in/Users/satya/Downloads/SageMath/local/lib/python2.7/site-packages/sage/symbol/ring.so
生成[3]:***[doc html]错误1
生成[2]:***[all start]错误2
实19m41.468s
用户59m18.862s
系统3m0.256s
***************************************************************
构建Sage时出错。
以下程序包可能无法生成(不一定
在运行“全部启动”的过程中:
生成目录可能包含配置文件和其他可能的文件
有用的信息。警告:如果现在再次运行“make”,则生成
默认情况下,目录将被删除。设置环境变量
SAGE_KEEP_Build_SPKG为“是”以防止出现这种情况。
生成[1]:***[all start]错误1
make:**[全部]错误2

任何帮助都将不胜感激。

运行SageMath的
make
分两步进行:
make build
然后是
make doc

在您的情况下,
make build
阶段似乎已经完成, 只有在
makedoc
阶段才出现问题。 这意味着你可能已经有了一个函数数学, 有一个缺点,文档未能生成。 因此,您可能会决定尝试按原样使用它

在@John Palmieri之后,我建议将帖子发送给sage-devel 或sage支持以获取调试make失败的帮助。会的 用于指定发生此错误的操作系统 (macOS的哪个版本),如果buid是从目录启动的 通过git clone或源tarball获得,具体是什么 运行了一系列操作

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

根据Samuel的回答,您可能想尝试的另一件事是只需运行
使文档干净
,然后再次运行
使文档
。我发现(在Mac电脑上)有时会有一个奇怪的打嗝,我永远也找不到,而且这种情况通常会过去。

你在
sage-devel
谷歌群中的帖子比这里更有可能得到有用的回复。