【问题标题】:Numpy build failure on Ubuntu Core (with snapcraft)Ubuntu Core 上的 Numpy 构建失败(使用 snapcraft)
【发布时间】:2018-08-28 22:18:06
【问题描述】:

最后我的应用程序在 Ubuntu 16.04 和 17.10 上进行了捕捉,但现在我尝试在 Ubuntu Core(使用我的树莓派)上捕捉它,而我的 python 部分(取决于 numpy)在构建时遇到了以下问题:

Running setup.py bdist_wheel for numpy ... error
Complete output from command /home/getty23/cavi/cavi-device-snap/parts/cavi-device-sdk/install/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9foo8C/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/tmpewhEJRpip-wheel-:
Running from numpy source directory.
blas_opt_info:
blas_mkl_info:
 libraries mkl,vml,guide not found in ['/home/getty23/cavi/cavi-device-snap/parts/cavi-device-sdk/install/usr/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/arm-linux-gnueabihf']
 NOT AVAILABLE

... (更多日志here) ...

arm-linux-gnueabihf-gcc: numpy/core/src/multiarray/arrayobject.c
 numpy/core/src/multiarray/arrayobject.c:1838:5: error: ‘array_methods’     undeclared here (not in a function)
   array_methods,                              /* tp_methods */
   ^
numpy/core/src/multiarray/arrayobject.c:1840:5: error: ‘array_getsetlist’ undeclared here (not in a function)
   array_getsetlist,                           /* tp_getset */
   ^
numpy/core/src/multiarray/arrayobject.c:1838:5: error: ‘array_methods’ undeclared here (not in a function)
   array_methods,                              /* tp_methods */
   ^
numpy/core/src/multiarray/arrayobject.c:1840:5: error: ‘array_getsetlist’ undeclared here (not in a function)
   array_getsetlist,                           /* tp_getset */

这是应用程序中使用 numpy 的部分:

parts:
 cavi-device-sdk:
  plugin: python
  python-version: python2
  source: ../cavi-device-sdk
  stage-packages:
  - liblapack-dev
  - libatlas-base-dev
  - gfortran
  - libatlas-dev
  - python-dev
  - libc6
  - python-numpy

我已经尝试包含不同的库 (libblas-dev liblapack-dev libatlas-base-dev gfortran libatlas-dev python-dev),并且我还移回了旧的 numpy 版本 1.10.1。但没有什么真正有帮助。 如果一些 numpy/snapcrafft 专家可以帮助我找出问题,那就太好了。

【问题讨论】:

    标签: python numpy ubuntu build snapcraft


    【解决方案1】:

    我找到了问题的答案。似乎我使用了错误的 numpy 版本。使用 numpy 1.11.0 和以下阶段包它正在工作:

     - gcc
     - gfortran
     - python-dev
     - libc6
     - libblas3
     - liblapack3
     - libopenblas-dev
     - liblapack-dev
     - cython
    

    【讨论】:

      【解决方案2】:

      除了安装 Miniconda,它会安装旧版本的 numpy,我还使用了以下步骤:

      easy_install pip==1.5.6
      pip install numpy==1.14.5

      确保您拥有setuptoolswheel 最新版本。 Sudo 和 chroot 也可能会影响该过程。

      我在以下位置记录了我使用 Ubuntu Core 的个人经验:

      GitHub Repo - Ubuntu Core in Raspberry

      【讨论】:

        猜你喜欢
        • 2021-05-09
        • 1970-01-01
        • 2019-06-28
        • 2023-03-08
        • 1970-01-01
        • 2013-12-28
        • 2016-04-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多