问题:如何修复Dockerfile以正确冻结requirements.txt并成功构建?
我正在部署Python脚本的Dockerfile,利用Pyenv和Pipenv进行本地开发。
在将Piplock文件冻结到requirements.txt的构建步骤中,我收到以下错误:
错误:“-- Python”的无效值:路径/Users/jz/.local/share/virtualenvs/quanter-TP0oWHoL/bin/python3上的预期Python不存在
我的Dockerfile是:
FROM python:3.7
RUN pip install pipenv
COPY P
我在我的码头安装pipenv:
RUN pip install pipenv
RUN cd /my/app/path/ && pipenv install
RUN cd /my/app/path/ && pipenv shell
我得到了错误:
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/di
我在django的一个项目中工作,其中我使用了使用pipenv shell的虚拟环境(它创建了环境名称(Django_and_Rest-YRrszWnq)),所以在这个环境中,我安装了许多与该项目相关的包 现在我开始了新的项目,我也想使用上面的虚拟环境,如何使用pipenv命令将这个((Django_ and _Rest-YRrszWnq))环境激活到新项目中?
当我跑的时候
pipenv --python 3.7
它确实是:
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its ow