1

Let's take an example of Pipfile below. Here I would like to freeze only ipdb to dev.txt

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
ipdb = "*"

[packages]
django = "*"

[requires]
python_version = "3.7"

I know to how to freeze requirements but I want to freeze specific dev packages into dev.txt

I have checked into Generating Requirements from the docs.

Docs have only $pipenv lock -r --dev > requirements.txt which generates all the dependencies.

I have tried $pipenv lock --dev > dev.txt. It does not work.

Any help would be much appreciated.

bkawan
  • 1,171
  • 8
  • 14

2 Answers2

1

Yes it works with pipenv lock --dev -r > dev.py.

Maybe you are confused about the number of dependencies, it's because you have all the dependencies of your dev packages and so on. But there is only your dev packages here.

EDIT: Don't forget the -r option, it's maybe what you are missing.

juncaks
  • 86
  • 7
0

The -d or --dev generates both develop and default requirements.

To only generate dev requirement.

pipenv lock --dev-only -r > dev.txt

Premkumar chalmeti
  • 800
  • 1
  • 8
  • 23