Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is pipenv [dev-packages] section for?

Tags:

python

pipenv

I'm learning pipenv and there's something I don't quite understand. Apparently your Pipfile can contain two sections:

[packages]
...

[dev-packages]
....

As I understand it, the packages section is where the packages that you install are listed. But what is the dev-packages section for? How is it different from the packages section?

like image 375
Jim Avatar asked Nov 23 '18 19:11

Jim


People also ask

What does Pipenv install -- dev do?

If you use pipenv install --dev in your project, pipenv should install all the packages that are required to develop your project. If it recursively installed all dev dependencies all the way down, it might pull in Python profiling packages, test runners, etc., that other packages need for development.

Where are packages installed in Pipenv?

Turns out it's surprisingly simple. Go to the root of your project & open up a new terminal. Use the following commands to open a shell and get the location of the virtual environment. If you open up this in the file explorer, you'll find exactly where the modules are being installed.

What does Pipenv three do?

It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile. lock , which is used to produce deterministic builds.


1 Answers

This section is for development requirements. So stuff like linters, unit test libraries, etc. All that is not needed on user's machine.

To install package as dev-requirement add -d to install command, to install the dev-requirements section add -d to sync command.

like image 53
Andrew Morozko Avatar answered Oct 11 '22 02:10

Andrew Morozko