首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否可以在pypy (3.8)下安装pypy (1.8.0)?

是否可以在pypy (3.8)下安装pypy (1.8.0)?
EN

Stack Overflow用户
提问于 2022-08-16 20:49:51
回答 2查看 244关注 0票数 0

我只是尝试在pypy (版本3.8)下安装软件包scipy==1.8.0。

代码语言:javascript
复制
pip install scipy==1.8.0

首先,安装过程失败,出现以下警告和错误:

代码语言:javascript
复制
Building wheels for collected packages: scipy
  Building wheel for scipy (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for scipy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1198 lines of output]



WARN: Could not locate executable armflang
WARN: Could not locate executable gfortran
WARN: Could not locate executable f95
WARN: Could not locate executable ifort
WARN: Could not locate executable ifc
WARN: Could not locate executable lf95
WARN: Could not locate executable pgfortran
WARN: Could not locate executable nvfortran
WARN: Could not locate executable f90
WARN: Could not locate executable f77
WARN: Could not locate executable fort
WARN: Could not locate executable efort
WARN: Could not locate executable efc
WARN: Could not locate executable g77
WARN: Could not locate executable g95
WARN: Could not locate executable pathf95
WARN: Could not locate executable nagfor
WARN: Could not locate executable frt
WARN: don't know how to compile Fortran code on platform 'posix'


error: library mach has Fortran sources but no Fortran compiler found

其次是,我用以下代码安装了gfortan:

代码语言:javascript
复制
sudo apt-get install gfortran

然后,and安装过程失败,出现以下错误:

代码语言:javascript
复制
compilation terminated.
  INFO: gcc: scipy/special/cephes/beta.c
  In file included from scipy/special/cephes/bdtr.c:149:
  scipy/special/cephes/mconf.h:56:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  INFO: gcc: scipy/special/cephes/btdtr.c
  INFO: gcc: scipy/special/cephes/cbrt.c
  INFO: gcc: scipy/special/cephes/chbevl.c
  In file included from scipy/special/cephes/beta.c:49:
  scipy/special/cephes/mconf.h:56:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  In file included from scipy/special/cephes/besselpoly.c:1:
  scipy/special/cephes/mconf.h:56:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  INFO: gcc: scipy/special/cephes/chdtr.c
  In file included from scipy/special/cephes/btdtr.c:53:
  scipy/special/cephes/mconf.h:56:10: fatal error: Python.h: No such file or directory
   #include <Python.h>
            ^~~~~~~~~~
  compilation terminated.
  INFO: gcc: scipy/special/cephes/const.c
  INFO: gcc: scipy/special/cephes/dawsn.c
  In file included from scipy/special/cephes/chbevl.c:60:
  scipy/special/cephes/mconf.h:56:10: fatal error: Python.h: No such file or directory
   #include <Python.h>


ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy, which is required to install pyproject.toml-based projects

我也试过:

  • 对pip、安装工具和车轮进行升级
  • 其他版本的枕(1.9.0,1.7.0,1.6.0)。

我想知道这个问题是否有解决办法,是否与pypy兼容。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-08-17 15:54:01

感谢您的回复。

我只是遵循了这些步骤,问题就解决了。

代码语言:javascript
复制
sudo apt install libblas3 liblapack3 liblapack-dev libblas-dev

sudo apt install gfortran

pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 scipy==1.8.0
票数 0
EN

Stack Overflow用户

发布于 2022-08-17 09:49:59

我强烈建议使用通过康达锻造提供的预编译二进制文件。编译枕叶并不是一项琐碎的任务。也许有一天pip install --only-binary :all:会支持PyPy,参见本期

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73380170

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档