4 ms·
pip throws your dependencies in some lib directory either on your system (default if you use sudo), in your home directory (default if you don't use sudo), or i
by dheera 4y ago
pip throws your dependencies in some lib directory either on your system (default if you use sudo), in your home directory (default if you don't use sudo), or inside your virtualenv's lib directory.
npm pulls dependencies into node_modules as a subdirectory of your own project as default.
Python really should consider doing something similar. Dependencies shouldn't live outside your project folder. We are no longer in an era of hard drive space scarcity.
- coredog64 4y agoAs of Python 3, pip install into the system Python lib directory is strongly discouraged. ISTR that even using pip to update pip results in a warning. That’s not to say that there’s not still some libs out there that haven’t updated docs to get with the times.
- kevin_thibedeau 4y agoMore distros should adopt the Debian practice of installing into dist-packages and leaving site-packages as a /usr/local equivalent for pip to use on it's own.
- cozzyd 4y agoHave you seen how much space a virtualenv uses? It can easily be >1 GB. For every project, this adds up. (Not to mention the bandwidth, which is not always plentiful).
- dheera 4y ago4TB hard drives are $300 these days.
- mardifoufs 4y ago4tb HDDs are closer to 80$ now, but that reinforces your point :). Even SSDs are now close to 300$ for 4tb!
- dheera 4y agoYeah i meant 4TB SSDs, who uses magnetic HDDs anymore lol
- hnbad 4y agoWell, npm uses a cache so it won't re-download every package every time you install it.