申威3231+Uos v20,安装sklearn

问题讨论 问题讨论 1835 人阅读 | 3 人回复 | 2021-09-27

申威3231+Uos20操作系统,Python3.7.3,Python包版本如下:asn1crypto      0.24.0
certifi         2018.8.24
chardet         3.0.4
configobj       5.0.6
cryptography    2.6.1
cupshelpers     1.0
Cython          0.28.5
decorator       4.3.0
devscripts      2.19.5-deb10u1-0eagle1
distro          1.3.0
entrypoints     0.3
idna            2.6
iotop           0.6
joblib          1.0.1
keyring         17.1.1
keyrings.alt    3.1.1
numpy           1.16.2
olefile         0.46
onboard         1.4.1
opencv-python   4.5.3.56
packaging       21.0
Pillow          5.4.1
pip             18.1
pycairo         1.16.2
pycrypto        2.6.1
pycups          1.9.73
PyGObject       3.30.4
pyparsing       2.4.7
python-dateutil 2.7.3
pyudev          0.21.0
pyxdg           0.25
requests        2.21.0
scikit-build    0.12.0
scipy           1.1.0
SecretStorage   2.3.1
setuptools      40.8.0
six             1.12.0
sophon          master-
threadpoolctl   2.2.0
urllib3         1.24.1
wheel           0.32.3

1、安装scikit-learn 1.0的包,pip直接安装 报错如下:
error: Command "sw_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -Wformat -Werror=format-security -mieee -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/src.linux-sw_64-3.7/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.linux-sw_64-3.7/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.7m -Ibuild/src.linux-sw_64-3.7/numpy/core/src/common -Ibuild/src.linux-sw_64-3.7/numpy/core/src/npymath -Ibuild/src.linux-sw_64-3.7/numpy/core/src/common -Ibuild/src.linux-sw_64-3.7/numpy/core/src/npymath -c build/src.linux-sw_64-3.7/numpy/core/src/npymath/ieee754.c -o build/temp.linux-sw_64-3.7/build/src.linux-sw_64-3.7/numpy/core/src/npymath/ieee754.o -MMD -MF build/temp.linux-sw_64-3.7/build/src.linux-sw_64-3.7/numpy/core/src/npymath/ieee754.o.d" failed with exit status 1


        ----------------------------------------
    Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6ce9pa70/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-2dh_9rnj/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-9d1wjjv5 --compile" failed with error code 1 in /tmp/pip-install-6ce9pa70/numpy/


    ----------------------------------------
  Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9d1wjjv5 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel<0.37.0 setuptools<58.0.0 Cython>=0.29.18,<3.0 pybind11>=2.4.3,<2.7.0 pythran==0.9.11 "numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'" "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'" "numpy==1.16.5; python_version=='3.7' and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'" "numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'" "numpy==1.19.3; python_version=='3.9' and platform_python_implementation != 'PyPy'" "numpy==1.20.0; python_version=='3.7' and platform_python_implementation=='PyPy'" "numpy; python_version=='3.8' and platform_python_implementation=='PyPy'" "numpy; python_version=='3.9' and platform_python_implementation=='PyPy'"" failed with error code 1 in None


  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-faes0d2n --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython>=0.28.5 "oldest-supported-numpy; python_version!='3.7' or platform_machine=='aarch64' or platform_system=='AIX' or platform_python_implementation == 'PyPy'" "numpy==1.14.6; python_version=='3.7' and platform_machine!='aarch64' and platform_system!='AIX' and platform_python_implementation != 'PyPy'" scipy>=1.1.0" failed with error code 1 in None
2、下载sklearn的包,离线源码编译安装,报错如下:

error: Command "sw_64-linux-gnu-ar rcs build/temp.linux-sw_64-3.7/liblibsvm-skl.a build/temp.linux-sw_64-3.7/sklearn/svm/src/libsvm/libsvm_template.o" failed with exit status 127

回复

使用道具 举报

回答|共 3 个

wjw

发表于 2021-9-27 13:07:12 | 显示全部楼层

numpy 使用uos 源内的,apt 安装,pip安装会去装网上在线的版本,没办法编译通过
回复

使用道具 举报

TecSupport

发表于 2021-10-11 14:50:49 | 显示全部楼层

从互联网下载的软件,不是直接在申威平台就可以直接编译使用,需要做平台架构代码移植。
回复

使用道具 举报

TecSupport

发表于 2021-10-11 16:32:56 | 显示全部楼层

直接下载安装会编译numpy,numpy有架构相关问题,所以无法直接安装;
离线编译不过是你其他软件版本影响的吧?

这里有一个我们编译好的二进制,你可以尝试下
链接:https://pan.baidu.com/s/1jqeqPgEPHNqi68QSmys6xg
提取码:dtiu
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则