7 ms·
I think you're right, the biggest pain for a general developer for Python is determining which package manager to use. I'm thankfully insulated from it a bit du
by yladiz 9y ago
I think you're right, the biggest pain for a general developer for Python is determining which package manager to use. I'm thankfully insulated from it a bit due to using Docker for a lot of my development, but I hate the fact that Pip won't install to your home/project directory unless you coax it to (and sometimes still won't even if you give it all the proper environment variables), and I think virtual environments are not the solution (I shouldn't have to think about how to install a package or work on a project). Especially coming from Node-land, and before that Ruby-land, Python seemed like a wonderfully designed language but with terrible package managers. From what I remember Pip is going to change the default to install on the home directory sometime in the future, but it shouldn't have taken years of discussion to come to the conclusion that it's the right thing to do.
- thanksgiving 9y agoI like python3 -m venv myfolder; source myfolder/bin/activate; It is the easiest way to use python3 because even fedora (one of the more bleeding edge) likely won't finish migrating 2 to 3 in current year. Why do you not like venv? What could be done better?
- yladiz 9y agoI don't really like virtualenv because you have to activate it to do anything and deactivate it if you want to go to another project or work on something unrelated. I'd much rather it work by the project directory so I don't have to worry about the activation part (this is why Node's package manager, for all its issues, is great: you install in a local folder unless you explicitly supply the -g flag). At least I should be able to install packages to my home directory.
- thanksgiving 9y agoAh yes. Local by default would be nicer.
- yladiz 9y agoI still think that the "project" directory is best, but I'm glad that Pip is moving to local-by-default in any case. It won't take away from the necessity of virtualenv for cases of different dependency versions, e.g. Django 1.4 and 1.10, I think, unfortunately, but it's definitely better than global by default.
- raarts 9y agoThe problem is not for people like you who already decided, the problem is for beginners who aren't aware of some of the 'envs' and are looking for recommended practices.
- cfusting 9y agoI've moved to Anaconda and never looked back. Worst case you use pip within your Anaconda environment. Best and usual case everything just works.
- mixmastamyk 9y agopip install --user pkgname Does that not work for you?
- yladiz 9y agoThe user flag doesn't always work correctly, but my main annoyance is that I shouldn't have to supply a flag to do this. It should be default.
- mixmastamyk 9y agoI agree, and they are working towards it. In the meantime, there are shell aliases. That's how I ask rm to confirm deletion as well.