【发布时间】:2019-02-06 01:08:25
【问题描述】:
我正在尝试使用 docker 映像安装 scikit-learn!它失败了,这是错误:
ImportError: Numerical Python (NumPy) is not installed.
scikit-learn requires NumPy >= 1.8.2.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
Failed building wheel for scikit-learn
但在 scikit-learn pip 尝试安装 numpy==1.9.0 之前的日志中,日志显示它已完成,我什至尝试安装:
scikit-learn[alldeps]==0.19.1
但什么都没有改变!同样的错误
我的hole docker 映像在没有 scikit-learn 的情况下运行良好,我的应用程序正在运行,除了 scikit-learn 部分!
我尝试更改版本并安装最新版本:
scikit-learn[alldeps]
没关系,但我的应用程序有些不兼容我需要使用 0.19.1 版本,而不是 0.19.2!
ps:我的 requirements.txt 文件在我的 python3 venv(mac 和 ubuntu)中工作!!!
【问题讨论】:
-
another question也有同样的问题,我觉得还是sciket-learn pip repositorystackoverflow.com/questions/51657805/…
-
您正在尝试使用哪个版本的 python 并上传 Dockerfile 以供参考。
-
来自 python:3 !第 3 版
标签: python numpy scikit-learn dockerfile docker-image