1

最后,我在 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

...(更多日志在这里)...

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 专家可以帮助我找出问题,那就太好了。

4

2 回答 2

0

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

 - gcc
 - gfortran
 - python-dev
 - libc6
 - libblas3
 - liblapack3
 - libopenblas-dev
 - liblapack-dev
 - cython
于 2018-03-23T16:41:06.090 回答
0

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

easy_install pip==1.5.6
pip install numpy==1.14.5

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

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

GitHub Repo - Raspberry 中的 Ubuntu 核心

于 2018-07-04T20:11:10.860 回答