Tag: python 3.4

ImportError:没有模块在Docker中使用pip命名包

我使用Docker来构build我的应用程序。 我使用pip从requirements.txt安装软件包,但软件包不包含在构build中。 FROM python:3.4 WORKDIR /app ADD . /app RUN apt-get update && apt-get install -y \ python3-pip python-pip\ cron \ unixodbc \ unixodbc-dev \ python3-dev \ python3-setuptools \ && rm -rf /var/lib/apt/lists/* RUN pip install –upgrade pip RUN pip install sendgrid RUN pip3 install -r requirements.txt ENV CONFIG_ENV .env ADD validator-cron /etc/cron.d/validator-cron-job RUN chmod […]

Python3的UTF8编解码器没有按照预期在docker解码Ubuntu的:可靠

下面的东西真的让我感到困惑,我的笔记本电脑上的python版本以及Docker的Ubuntu中的python版本:可靠的图像打印不同的结果与他们的编解码器,这是什么原因? 例如,我的笔记本上的python3(ubuntu,trusty): Python 3.4.3 (default, Apr 14 2015, 14:16:55) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import codecs >>> codecs.decode(b'\xe2\x80\x99','utf8') ''' >>> python3上的Docker Ubuntu的:最新的: Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import codecs >>> […]

Docker Build不能find点子

尝试通过AWS am遵循一些简单的Docker教程,并得到以下错误: > docker build -t my-app-image . Sending build context to Docker daemon 94.49 MB Step 1 : FROM amazon/aws-eb-python:3.4.2-onbuild-3.5.1 # Executing 2 build triggers… Step 1 : ADD . /var/app —> Using cache Step 1 : RUN if [ -f /var/app/requirements.txt ]; then /var/app/bin/pip install -r /var/app/requirements.txt; fi —> Running in d48860787e63 /bin/sh: […]