When you run manage.py hoge
in Django
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' (/usr/lib/python3.8/site-packages/django/utils/translation/__init__.py)
If you encounter this error, it is possible that Django 4.0 is installed.
By the way, if you're installing dependencies with Pipenv in a Dockerfile, you can use the following commands:
COPY Pipfile /tmp/Pipfile
COPY Pipfile.lock /tmp/Pipfile.lock
...
RUN PIPENV_PIPFILE=/tmp/Pipfile pipenv install --system --ignore-pipfile --deploy
By adding the --ignore-pipfile
option, the installation behavior will be similar to pipenv sync
, which installs from the Pipfile.lock
.
Comments