4 ms·
> NPM might suck for various reasons but at least all deps are installed local to each project. I'm sure there are secret incantations for doing the same in per
by SmirkingRevenge 8y ago
> NPM might suck for various reasons but at least all deps are installed local to each project. I'm sure there are secret incantations for doing the same in perl and python but by default most stuff I download requires global libraries to be installed
No magic required in Python at all for this. Just use virtualenv from your project directory (don't bother with vitrualenvwrapper).
$ virtualenv venv; . ./venv/bin/activate
- tokyodude 8y agoIMO it *is" magic because it's not the default. with npm I have to go through special effort to get anything to install globally. With both python and perl I've read countless books and websites over the last 20 years and never once ran into that incantation. They all just say type install Chocolate::Belgian or cpan Chocolate::Belgian or python -m pip install SomePackage etc..
- tech2 8y agoLikewise don't bother with `activate`, just use the tools from the virtualenv directly `venv/bin/pip`, `venv/bin/python` etc.