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 0644 /etc/cron.d/validator-cron-job RUN touch /var/log/cron.log CMD cron && tail -f /var/log/cron.log 

我使用pip安装sendgrid但我得到ImportError: no module found error

我已经解决了这个问题。 这是因为Python的path。