Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 无法使用pypy安装scipy(g+;+;生成错误)_Python 3.x_Scipy_Pypy - Fatal编程技术网

Python 3.x 无法使用pypy安装scipy(g+;+;生成错误)

Python 3.x 无法使用pypy安装scipy(g+;+;生成错误),python-3.x,scipy,pypy,Python 3.x,Scipy,Pypy,到2020年,可以使用pypy安装scipy。() 但是,车轮发生故障时会出现这种错误: error: Command "g++ -pthread -DNDEBUG -O2 -fPIC -I/tmp/pip-build-env-lfdsn__t/overlay/site-packages/numpy/core/include -I/usr/lib/pypy3/include -c scipy/_lib/_uarray/_uarray_dispatch.cxx -o build/temp.li

到2020年,可以使用pypy安装scipy。()

但是,车轮发生故障时会出现这种错误:

  error: Command "g++ -pthread -DNDEBUG -O2 -fPIC -I/tmp/pip-build-env-lfdsn__t/overlay/site-packages/numpy/core/include -I/usr/lib/pypy3/include -c scipy/_lib/_uarray/_uarray_dispatch.cxx -o build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o -MMD -MF build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1


  ERROR: Failed building wheel for scipy
未能生成scipy 错误:无法为使用PEP 517且无法直接安装的scipy生成控制盘

使用--no-use-pep517选项可以得到类似的结果:

    error: Command "g++ -pthread -DNDEBUG -O2 -fPIC -I/home/ezako/.local/lib/pypy3.6/site-packages/numpy/core/include -I/usr/lib/pypy3/include -c scipy/_lib/_uarray/_uarray_dispatch.cxx -o build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o -MMD -MF build/temp.linux-x86_64-3.6/scipy/_lib/_uarray/_uarray_dispatch.o.d -std=c++14 -fvisibility=hidden" failed with exit status 1 
ERROR: Command errored out with exit status 1: /usr/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2ffzze2v/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2ffzze2v/scipy/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-8avik0f1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/ezako/.local/include/python3.6/scipy Check the logs for full command output.
Numpy已成功安装PY3

➜ pypy3 -V
Python 3.6.9 (7.3.0+dfsg-1~ppa1~ubuntu19.04, Dec 26 2019, 11:14:16)
[PyPy 7.3.0 with GCC 8.3.0]

这是对我有用的东西。我打开箱子


显然,您需要单独安装pybind11,因为它在PEP 517独立版本中无法正常工作。

我遇到了同样的问题,但我找到的解决方案都没有帮助我。 我试过:

  • 升级pip
  • 降级pip
  • 使用
    --无缓存目录
    标志
  • 升级
    setuptools
    wheel
  • 使用
    --默认pip
    标志
  • 使用
    --不使用-pep517
    标志
所以我尝试用手动安装,一切正常

git clone https://github.com/scipy/scipy.git
cd scipy
git submodule update --init
pypy -mpip install .

您可能需要设置
BLAS
LAPACK
ATLAS
库路径。

pypypy-V显示什么?您应该至少使用PyPy7.3.0。。。为什么是
g++
而不是
gcc
?回答是用这些信息编辑的。你能试试
pypypy3-mpip install-v scipy
并报告实际失败的地方吗?这似乎是一些汇编,但究竟是什么?它的工作!在上一次测试中,我还在scipy之前安装了pybind11。我猜是夜间构建修复了我遇到的bug。
pypy -mensurepip
pypy -mpip install --upgrade pip setuptools wheel
pypy -mpip install numpy pybind11
pypy -mpip install scipy
git clone https://github.com/scipy/scipy.git
cd scipy
git submodule update --init
pypy -mpip install .