当我编译graalpython -m ginstall install pandas或graalpython -m ginstall install bumpy时,我得到了以下错误,请评论如何修复错误。谢谢。
line 54, in __init__
File "number.c", line 284, in array_power
File "ufunc_object.c", line 4688, in ufunc_generic_call
File "ufunc_object.c", line 3178, in PyUFunc_GenericFunction
File "ufunc_type_resolution.c", line 180, in PyUFunc_DefaultTypeResolver
File "ufunc_type_resolution.c", line 2028, in linear_search_type_resolver
File "ufunc_type_resolution.c", line 1639, in ufunc_loop_matches
File "convert_datatype.c", line 904, in PyArray_CanCastArrayTo
java.lang.AssertionError发布于 2021-02-02 18:41:26
你可能把默认系统python安装的包和graalpython安装的包混在一起了。默认情况下,graalpython安装在与CPython (~/.local/lib/python3.8/site-packages/)相同的站点范围目录中。
解决这个问题的最简单方法是使用GraalPython支持的venv。例如:
$GRAALVM_HOME/bin/graalpython -m venv /path/to/my/new/venv
. /path/to/my/new/venv/bin/activate
python -c 'import platform; print(platform.python_implementation())'
# output: GraalVM
python -m ginstall install pandas
# to end the venv session:
deactivate
python -c 'import platform; print(platform.python_implementation())'
# output: CPython发布于 2021-02-03 08:44:37
我发现~/.bash_profile中有很多环境变量。我注释了所有它们,并成功地编译了numpy/pandas。顺便问一下,我如何验证gcc/clang的设置是否正确?不管怎样,谢谢你的帮助。
#export CC=/usr/local/Cellar/gcc/10.1.0/bin/gcc-10
#export CXX=/usr/local/Cellar/gcc/10.1.0/bin/g++-10
#export CC=/usr/bin/clang
#export CXX=/usr/bin/clang++
#export C_INCLUDE_PATH=/usr/local/Cellar/libiomp/20150701/include/libiomp:$C_INCLUDE_PATH
#export CPLUS_INCLUDE_PATH=/usr/local/Cellar/libiomp/20150701/include/libiomp/:$CPLUS_INCLUDE_PATH
#export LIBRARY_PATH=/usr/local/Cellar/libiomp/20150701/lib:$LIBRARY_PATH
#export DYLD_LIBRARY_PATH=/usr/local/Cellar/libiomp/20150701/lib:$DYLD_LIBRARY_PATH
#export MPICXX=mpicxx
#export LDFLAGS="-pthread -lm"
#export CFLAGS="-Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -fopenmp"https://stackoverflow.com/questions/65974443
复制相似问题