Why does 'pipenv lock -r' errors with 'No such option: -r'?
Question:
With this minimal Dockerfile
FROM public.ecr.aws/lambda/python:3.8
RUN pipenv lock -r > requirements.txt
The pipenv
command fails with the error message:
Usage: pipenv lock [OPTIONS]
Try ‘pipenv lock -h’ for help.
Error: No such option: -r
And, so, the docker build fails with
The command ‘/bin/sh -c pipenv lock -r > requirements.txt’ returned a non-zero code: 2
My pipenv is in version 2023.2.4.
pipenv lock -h
doesn’t show the option -r
exists and I can’t find anything online for this. Is the option deprecated? Is it changed?
Answers:
You are correct, this command does not work anymore
pipenv lock -r > requirements.txt
The recommended replacement is
pipenv requirements > requirements.txt
As pointed in the issue 5253 from there issue tracker.
With this minimal Dockerfile
FROM public.ecr.aws/lambda/python:3.8
RUN pipenv lock -r > requirements.txt
The pipenv
command fails with the error message:
Usage: pipenv lock [OPTIONS]
Try ‘pipenv lock -h’ for help.Error: No such option: -r
And, so, the docker build fails with
The command ‘/bin/sh -c pipenv lock -r > requirements.txt’ returned a non-zero code: 2
My pipenv is in version 2023.2.4.
pipenv lock -h
doesn’t show the option -r
exists and I can’t find anything online for this. Is the option deprecated? Is it changed?
You are correct, this command does not work anymore
pipenv lock -r > requirements.txt
The recommended replacement is
pipenv requirements > requirements.txt
As pointed in the issue 5253 from there issue tracker.