Tho*_*ert 5 pypy scipy python-3.x
截至 2020 年,可以使用 pypy 安装 scipy。(pypy下可以安装scipy吗?)
\n\npypy3 -mpip install scipy\nRun Code Online (Sandbox Code Playgroud)\n\n然而,轮子因这种错误而失败:
\n\n 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\n\n\n ERROR: Failed building wheel for scipy\nRun Code Online (Sandbox Code Playgroud)\n\n无法构建 scipy\n错误:无法为使用 PEP 517 的 scipy 构建轮子,并且无法直接安装
\n\n使用 --no-use-pep517 选项给出类似的结果:
\n\n 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 \nERROR: 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.\nRun Code Online (Sandbox Code Playgroud)\n\nNumpy 已成功安装 pypy3。
\n\n\xe2\x9e\x9c pypy3 -V\nPython 3.6.9 (7.3.0+dfsg-1~ppa1~ubuntu19.04, Dec 26 2019, 11:14:16)\n[PyPy 7.3.0 with GCC 8.3.0]\nRun Code Online (Sandbox Code Playgroud)\n
这对我有用。我打开了最新的 nightly
pypy -mensurepip
pypy -mpip install --upgrade pip setuptools wheel
pypy -mpip install numpy pybind11
pypy -mpip install scipy
Run Code Online (Sandbox Code Playgroud)
显然,您需要单独安装 pybind11,因为它在 PEP 517 隔离构建中无法正常工作。