【发布时间】:2020-08-05 12:18:57
【问题描述】:
我正在尝试通过 pip 在我的 64 位 ARMV8 板上安装 scipy。我已经安装了 scipy 所需的 openblas。所以,这没有问题。当我给 pip3 install scipy --trusted-host pypi.org --trusted-host files.pythonhosted.org 时,我得到了错误 Failed building wheel for scipy 。我的/usr/bin 中有 pip3 和 pip3.5,其余的 pip 在/usr/lib64/python3.5/site-packages。所以基本上,我也有 pip。
我还尝试使用--no-binary 选项安装 scipy,这是网上的答案之一。但是,它给了我同样的错误。下面是我得到的错误。
错误:
Collecting scipy
Downloading scipy-1.4.1.tar.gz (24.6 MB)
|################################| 24.6 MB 6.6 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: scipy
Building wheel for scipy (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/lib64/python3.5/site-packages/pip-20.0.2-py3.5.egg/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpkklsvv4v
cwd: /tmp/pip-install-9v4nmof7/scipy
Complete output (50 lines):
/usr/bin/python3: No module named pip
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib64/python3.5/subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpp7fvgp36', '--quiet', 'numpy>=1.13.3']' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/pip-20.0.2-py3.5.egg/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/usr/lib64/python3.5/site-packages/pip-20.0.2-py3.5.egg/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib64/python3.5/site-packages/pip-20.0.2-py3.5.egg/pip/_vendor/pep517/_in_process.py", line 182, in build_wheel
metadata_directory)
File "/usr/lib64/python3.5/site-packages/setuptools/build_meta.py", line 213, in build_wheel
wheel_directory, config_settings)
File "/usr/lib64/python3.5/site-packages/setuptools/build_meta.py", line 198, in _build_with_temp_dir
self.run_setup()
File "/usr/lib64/python3.5/site-packages/setuptools/build_meta.py", line 250, in run_setup
self).run_setup(setup_script=setup_script)
File "/usr/lib64/python3.5/site-packages/setuptools/build_meta.py", line 143, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 540, in <module>
setup_package()
File "setup.py", line 536, in setup_package
setup(**metadata)
File "/usr/lib64/python3.5/site-packages/numpy/distutils/core.py", line 126, in setup
dist = setup(**new_attr)
File "/usr/lib64/python3.5/site-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/usr/lib64/python3.5/site-packages/setuptools/__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "/usr/lib64/python3.5/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib64/python3.5/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib64/python3.5/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/usr/lib64/python3.5/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/usr/lib64/python3.5/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/usr/lib64/python3.5/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/usr/lib64/python3.5/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpp7fvgp36', '--quiet', 'numpy>=1.13.3']' returned non-zero exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
【问题讨论】:
-
/usr/bin/python3 --version?/usr/bin/python3 -m pip --version? -
@phd:
/usr/bin/python3 --version是 Python 3.5.3 而/usr/bin/python3 -m pip --version表示没有名为 pip 的模块。 -
你需要install
pip -
@phd:我已经安装了 pip。
/usr/bin/pip3 --version从 /usr/lib64/python3.5/site-packages/pip-20.0.2-py3.5.egg/pip (python 3.5) 提供 pip 20.0.2 -
"
/usr/bin/python3 -m pip --version说 没有名为 pip 的模块。" 表示您没有安装pip或/usr/bin/python3没有知道在哪里可以找到它。/usr/bin/python3 -c "import sys; print(sys.path)"—/usr/lib64/python3.5/site-packages在列表中吗?
标签: python scipy pip embedded-linux python-wheel