DEV Community

Discussion on: pnpm, but for Python?

Collapse
 
raulinlee profile image
Lee Raulin

Hmm... The main advantage of pnpn is that it will only ever store one copy on your hard drive for each library per version number, no matter what.

IOW, if it does not have a local copy of the version of the library you want, it downloads one and only one. Thereafter, every time you "install" that version of that library for a project, it just creates a symlink. This saves gigabytes, depending on how many projects you have.

(JS/Node doesn't have "virtual environments", but basically any time you install anything with npm without using the -g ("global") flag, it's effectively installed to a virtual environment for the project.)

As far as I know, pip doesn't do anything like that. It's just like npm--if you use a virtual env for every project, and lib-x v 1.0.3 is 5 Mb, and you install it for two projects, you now have 10 Mb less space. 3 projects, and it's 15 Mb, etc.

Of course, you could just install the lib globally, and have all your projects use that copy... Exactly like npm.