Hacker News new | ask | show | jobs
by jorge-fundido 1997 days ago
Throwing this out there for criticism... I use `python3 -m pip install -t .pip -r requirements.txt` and add .pip to my PYTHONPATH. That works for me without having to use any of the python virtual env tooling, basically trying to get something more npm like.

I don't work on any significant python code bases, so I expect it has limitations when compared to the virtual env options like developing with specific (or multiple) python versions.

1 comments

Hm, this sounds like something I would want to use, but I just tried it with an Ubuntu Bionic server on Dreamhost (Python 3.6) and got an exception installing flask and flup:

    distutils.errors.DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
I don't understand why this doesn't work, but it seems like it should.

I was able to install those 2 packages in a virtualenv (although weirdly Dreamhost requires you to build your own Python 3 to do that, python3 -m venv doesn't work)

I've been programming Python since 2003 and have no idea what's wrong :-(

TBH I thought I was a luddite for avoiding virtualenv and pip for a long time. I would downloads tarballs and use distutils to build them! But for this project I'm using flask which has more dependencies... Gah. And now I'm seeing all the downsides...