Tag: numpy

Docker无法安装numpy,scipy或gensim

我正在尝试构build一个Docker应用程序,该应用程序使用Python的gensim库,版本2.1.0,它是通过来自requirements.txt文件的pip安装的。 但是,Docker似乎在安装numpy,scipy和gensim时遇到了麻烦。 我GOOGLE了错误信息,发现其他用户经历了相同的问题,但在其他环境。 他们的许多解决scheme在Docker中似乎都不起作用。 以下是错误消息: <pre> Step 4 : RUN pip install -r requirements.txt —> Running in a86d07e229d7 Collecting Flask==0.12 (from -r requirements.txt (line 1)) Downloading Flask-0.12-py2.py3-none-any.whl (82kB) Collecting requests==2.17.3 (from -r requirements.txt (line 2)) Downloading requests-2.17.3-py2.py3-none-any.whl (87kB) Collecting numpy==1.12.1 (from -r requirements.txt (line 3)) Downloading numpy-1.12.1.zip (4.8MB) Collecting nltk==3.2.2 (from -r requirements.txt (line 4)) […]

在张量图像再训练中没有命名为“numpy”错误的模块

我最近正在按照张量stream图像分类(诗人的张量stream)教程。 每当我尝试重新训练我的图像数据集,我得到以下exception: 我检查了我的Python\Python35\Lib\site-packages文件夹,并在那里find一个名为'numpy'的文件夹。 此外,当我试图在Python中导入numpy时,它已成功导入。 我的Python版本是3.5.2 。 numpy可以在C:\\Users\\ummara.anjum\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\numpy\\__init__.py 。

numpy安装中缺lessnumpy.distutils,theano试图使用它

我正在尝试与Theano和烤宽面条build立一个Docker镜像。 这些是主要步骤: FROM nvidia/cuda:8.0-cudnn5-devel RUN apt-get install -y libopenblas-dev python-dev python-pip RUN pip install –upgrade pip RUN pip install nose numpy scipy pandas h5py scikit-image scikit-learn jupyter RUN pip freeze > requirements.txt && pip install -r requirements.txt –upgrade && rm requirements.txt RUN pip install –upgrade https://github.com/Theano/Theano/archive/master.zip RUN pip install –upgrade https://github.com/Lasagne/Lasagne/archive/master.zip 当图像准备就绪时,我启动它并尝试通过简单地在ipython中导入theano来testingtheano。 我得到以下错误(结束): /usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.pyc in […]

在docker中从源代码构buildnumpy

大家好,我正试图从docker容器源码build立numpy。 这是我的Dockerfile: FROM debian:testing MAINTAINER Dr Suman Khanal <suman81765@gmail.com> LABEL updated_at '2017-07-26' WORKDIR / RUN apt-get update \ && apt-get install -y gnupg git wget build-essential python3 python3-dev python3-setuptools python3-pip libatlas3-base libatlas-dev libatlas-base-dev liblapack-dev libblas-common libblas3 libblas-dev cython RUN git clone https://github.com/numpy/numpy.git WORKDIR /numpy RUN python3 setup.py build –fcompiler=gnu95 install CMD ["numpy"] 但它抛出这个错误。 Build failed: […]

在Docker容器内部运行的opencv3.0内存不足错误

OpenCV错误:OutOfMemoryError中内存不足(无法分配995522496字节)。 base_features, base_descs = detector.detectAndCompute(base_img, None) 在这个特定的行中,base_desc的长度(“len(base_descs)”)大约是70000. base_desc是一个numpy数组。 我目前使用4 GB的RAM,但仍然显示这个错误。 我正在docker容器内运行此代码,上面的代码工作正常,当我运行python代码而不使用系统中的容器。

在Docker Alpine上安装seaborn

我正在尝试安装这个Dockerfile的seaborn: FROM alpine:latest RUN apk add –update python py-pip python-dev RUN pip install seaborn CMD python 我得到的错误与numpy和scipy ( scipy要求)有关。 它始于: /tmp/easy_install-nvj61E/numpy-1.11.1/setup.py:327:UserWarning:无法识别的setuptools命令,继续生成Cython源代码并展开模板 并以…结束 在get_mathlib_info文件“numpy / core / setup.py”,第654行 RuntimeError:损坏的工具链:无法链接一个简单的C程序 命令“python setup.py egg_info”失败,错误代码1在/ tmp / pip-build-DZ4cXr / scipy / 命令'/ bin / sh -c pip install seaborn'返回一个非零的代码:1 任何想法如何我可以解决这个问题?

Sci-kit SVC:random_state在mac和我的docker镜像上产生不同的结果

我有一个在我的MAC上运行的Python程序,具有以下依赖关系: numpy的== 1.11.2 SciPy的== 0.18.1 scikit学习== 0.17.1 pymongo == 3.4.0 Redis的== 2.10.5 请求== 2.12.3 我试图根据一些训练数据来分类句子。 然后我想用Docker镜像部署这个python包。 使用SVCalgorithm numpy.random.seed(100) 分类器= SVC(概率=真,随机状态= 100) 这在Docker和我的本地系统中产生了不同的结果。 Python版本在两种环境下都是2.7.13。 有没有办法设置一个种子,以便我可以在我的本地环境中获得与我部署的环境相同的结果? 如果我将其安装在同事的MAC上,结果与我的本地环境一致。 这使我相信随机数发生器不是操作系统无关的。 任何方式来得到它? 感谢和美好的一天

在Docker Alpine上安装numpy

我正在尝试在基于Alpine 3.1的Docker容器中安装numpy。 我正在使用下面的Dockerfile: FROM alpine:3.1 RUN apk add –update make cmake gcc g++ gfortran RUN apk add –update python py-pip python-dev RUN pip install cython RUN pip install numpy 这运行良好,直到pip install numpy时候,我得到以下错误: error: Command "gcc -fno-strict-aliasing -Os -fomit-frame-pointer -DNDEBUG -Os -fomit-frame-pointer -fPIC -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private […]