Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.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 为scipy构建控制盘(setup.py):完成状态';错误';_Python_Docker_Numpy_Scipy_Requirements - Fatal编程技术网

Python 为scipy构建控制盘(setup.py):完成状态';错误';

Python 为scipy构建控制盘(setup.py):完成状态';错误';,python,docker,numpy,scipy,requirements,Python,Docker,Numpy,Scipy,Requirements,我正在尝试构建Docker映像,并使用requirements.txt文件安装这些需求: numpy==1.18.1 scipy==1.2.1 joblib==0.13.2 Cython==0.29.13 pandas==0.25.3 scikit-learn==0.21.3 h5py==2.8.0 Keras==2.3.1 Keras-Applications==1.0.8 Keras-Preprocessing==1.1.0 这是我的dockerfile: FROM python:3 M

我正在尝试构建Docker映像,并使用requirements.txt文件安装这些需求:

numpy==1.18.1
scipy==1.2.1
joblib==0.13.2
Cython==0.29.13
pandas==0.25.3
scikit-learn==0.21.3
h5py==2.8.0
Keras==2.3.1
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
这是我的dockerfile:

FROM python:3

MAINTAINER author@sample.com

RUN mkdir /test
COPY ./ /test
WORKDIR /test

## Install your dependencies here using apt-get etc.


RUN pip install -r requirements.txt
当我尝试构建时,这是我收到的错误消息

ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d0v5nn_0/scipy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d0v5nn_0/scipy/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/pip-wheel-u8mo7l4r
       cwd: /tmp/pip-install-d0v5nn_0/scipy/
  Complete output (9 lines):
  /tmp/pip-install-d0v5nn_0/scipy/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-d0v5nn_0/scipy/setup.py", line 492, in <module>
      setup_package()
    File "/tmp/pip-install-d0v5nn_0/scipy/setup.py", line 468, in setup_package
      from numpy.distutils.core import setup
  ModuleNotFoundError: No module named 'numpy'
  ----------------------------------------
  ERROR: Failed building wheel for scipy

但是没有成功

不确定这是否是错误的原因,但是考虑到错误,你应该选择Cython≥ 0.29.14而
requirements.txt
规定了
Cython==0.29.13

来自python:3的
导致获得python 3.8

此版本中支持的Python版本为3.5-3.8。下游的 开发人员应该使用Cython>=0.29.14来支持Python 3.8和 OpenBLAS>=3.7以避免Skylake体系结构上的错误


你是如何建造的?你使用Dockerfile吗?发布任何相关文件。您会看到错误
ModuleNotFoundError:没有名为'numpy'的模块
。因此您的requirements.txt中的模块没有安装,您需要在DockerFile中包含
pip install-r requirements.txt
。谢谢你的帮助。你现在可以看到我的Dockerfile了
Running setup.py clean for scipy