pip install numpy退出生成时出错,但仍会安装
我想在我的virtualenv中使用fedora30和python 3.7.3在raspberry pi上安装numpy。我键入pip install numpy退出生成时出错,但仍会安装,numpy,pip,raspberry-pi,fedora,lapack,Numpy,Pip,Raspberry Pi,Fedora,Lapack,我想在我的virtualenv中使用fedora30和python 3.7.3在raspberry pi上安装numpy。我键入pip install numpy,过了一段时间,它会生成一条巨大的错误消息,其中一部分似乎与lapack/blas有关,但仍在安装某种numpy。我不确定在这种情况下我是否可以信任任何numpy结果,并希望得到关于消除构建错误的建议。当包含sys/endian.h时,生成报告一个致命错误 我安装了与我通常在装有fedora30的x64计算机上安装的相同的系统软件包,在
pip install numpy
,过了一段时间,它会生成一条巨大的错误消息,其中一部分似乎与lapack/blas有关,但仍在安装某种numpy。我不确定在这种情况下我是否可以信任任何numpy结果,并希望得到关于消除构建错误的建议。当包含sys/endian.h
时,生成报告一个致命错误
我安装了与我通常在装有fedora30的x64计算机上安装的相同的系统软件包,在那里我通常可以运行pip install numpy
。在覆盆子上做这件事对我来说是新鲜事
我试图寻找一个提供endian.h
的包:dnf提供endian.h
,dnf提供sys/endian.h
,但运气不佳
在my virtualenv中运行pip install numpy
会在stderr上显示一条非常大的错误消息,并在stdout上显示以下文本:
Collecting numpy
Downloading https://files.pythonhosted.org/packages/b6/d6/be8f975f5322336f62371c9abeb936d592c98c047ad63035f1b38ae08efe/numpy-1.17.3.zip (6.4MB)
Building wheels for collected packages: numpy
Building wheel for numpy (setup.py): started
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): still running...
...
Building wheel for numpy (setup.py): still running...
Building wheel for numpy (setup.py): finished with status 'error'
Running setup.py clean for numpy
Failed to build numpy
Installing collected packages: numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: still running...
...
Running setup.py install for numpy: still running...
Running setup.py install for numpy: finished with status 'done'
Successfully installed numpy-1.17.3
问题:如果pip自己的构建失败,它最终安装了什么?在这种状态下,我可以依赖numpy结果吗?我可以做些什么来消除构建错误
我安装了通常在x64计算机上安装的相同系统包,但raspberry pi可能需要显式安装其他包
谢谢你的建议
pip卸载-y numpy
,然后pip安装numpy--索引url=https://www.piwheels.org/simple/
Hi hoefling,键入第二条语句将返回以下文本:查找索引:https://www.piwheels.org/simple/ 错误:找不到满足numpy要求的版本(来自版本:无)错误:找不到numpy的匹配发行版
pip中的python-c有什么作用?\u internal.pep425tags import get\u supported;print(get\u supported()[0])“
output?@hoefling输出读取:('cp37','cp37m',manylinux2014\u aarch64')
ERROR: Command errored out with exit status 1:
command: /home/examiner/projects/rekenlab_test/venv/rekenlab/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uke3fxog/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uke3fxog/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-q3wtyuey --python-tag cp37
cwd: /tmp/pip-install-uke3fxog/numpy/
Complete output (2777 lines):
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/home/examiner/projects/rekenlab_test/venv/rekenlab/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
blis_info:
customize UnixCCompiler
libraries blis not found in ['/home/examiner/projects/rekenlab_test/venv/rekenlab/lib', '/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
NOT AVAILABLE
...
/bin/sh: svnversion: command not found
...
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /home/examiner/projects/rekenlab_test/venv/rekenlab/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /home/examiner/projects/rekenlab_test/venv/rekenlab/lib
...
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib/
NOT AVAILABLE
...
Could not locate executable g95
customize PathScaleFCompiler
Could not locate executable pathf95
customize NAGFORCompiler
Could not locate executable nagfor
don't know how to compile Fortran code on platform 'posix'
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
...
compile options: '-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/home/examiner/installed/python3.7.3/usr/local/include/python3.7m -c'
gcc: _configtest.c
_configtest.c:1:10: fatal error: sys/endian.h: No such file or directory
1 | #include <sys/endian.h>
| ^~~~~~~~~~~~~~
compilation terminated.
failure.
removing: _configtest.c _configtest.o
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC
...
_configtest.c:1:10: fatal error: emmintrin.h: No such file or directory
1 | #include <emmintrin.h>
| ^~~~~~~~~~~~~
...
numpy/linalg/lapack_lite/f2c_blas.c: In function ‘zgemm_’:
numpy/linalg/lapack_lite/f2c_blas.c:15670:20: warning: variable ‘ncola’ set but not used [-Wunused-but-set-variable]
15670 | static integer ncola;
| ^~~~~
gcc: numpy/linalg/lapack_lite/f2c_config.c
gcc: numpy/linalg/lapack_lite/f2c.c
error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Inumpy/core/include -Ibuild/src.linux-aarch64-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/home/examiner/installed/python3.7.3/usr/local/include/python3.7m -Ibuild/src.linux-aarch64-3.7/numpy/core/src/common -Ibuild/src.linux-aarch64-3.7/numpy/core/src/npymath -Ibuild/src.linux-aarch64-3.7/numpy/core/src/common -Ibuild/src.linux-aarch64-3.7/numpy/core/src/npymath -c numpy/linalg/lapack_lite/f2c_d_lapack.c -o build/temp.linux-aarch64-3.7/numpy/linalg/lapack_lite/f2c_d_lapack.o -MMD -MF build/temp.linux-aarch64-3.7/numpy/linalg/lapack_lite/f2c_d_lapack.o.d" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for numpy
ERROR: Command errored out with exit status 1:
command: /home/examiner/projects/rekenlab_test/venv/rekenlab/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uke3fxog/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uke3fxog/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-uke3fxog/numpy
Complete output (10 lines):
Running from numpy source directory.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
ERROR: Failed cleaning build dir for numpy
$ python
Python 3.7.3 (default, Oct 15 2019, 15:38:35)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> a = np.array((1,2,3))
>>> a + 1
array([2, 3, 4])