Python as a language is a joy to use (for small projects), however pip has soured my experience of Python so drastically that I actively avoid taking up Python projects out of knowledge - not fear, knowledge - that the setup/install process is going to be a humongous pain. In most cases I can get started more easily with Node.js/TypeScript. in b4 "use some other package manager / pipenv / virtualenv etc" - no. How ab…
Use `Python -m Pip`
51–60 of 141 posts
Re: Use `Python -m Pip`
#52 alias pip="python -m pip"Re: Use `Python -m Pip`
#53Earlier quoted context omitted.
I'm relatively new to python. I use venv, pip and requirements.txt. It's dead simple. What am I missing?
The fact that the suggested solution in Python is to give every Python script a full copy of an entire specific Python runtime (via venv) is a mild annoyance as a design pattern... to me . Python scripting today requires shipping your development environment. Python is wonderful until you want to run that code on another machine. At that point, the target system has to venv their way into reproducing your environment…
Re: Use `Python -m Pip`
#54Python is a fun language but the ecosystem around it is horrible. It's a shame. I just want to pip install like I would a package manager
Re: Use `Python -m Pip`
#55Earlier quoted context omitted.
To be honest, I don't see how you can give this advice. A couple of the most popular package management systems for Python are very obviously deficient (and sigh, these are usually the ones I get stuck working with, due to outside constraints). A classic example is version pinning. Rust has Cargo.lock, Ruby has Gemfile.lock. Python? It depends on which one of the multitude of options you pick. But at least a couple o…
> A classic example is version pinning. Rust has Cargo.lock, Ruby has Gemfile.lock. Python? Does it matter? I get a different way to define dependencies. But the lock file itself is an implementation detail. You use the package manager the project uses and the lock file can be opaque. It's the same for package-lock.json / yarn.lock in js land.
Re: Use `Python -m Pip`
#56I wish there was a way to lock the global python so you couldn't install packages to it by accident
I have: $ cat ~/.pip/pip.conf [global] require-virtualenv = true ...which makes pip refuse to install anything unless I'm in an activated virtualenv. That, plus running as a regular user that doesn't have write permission to /usr, goes a long way.
Re: Use `Python -m Pip`
#57Earlier quoted context omitted.
The fact that the suggested solution in Python is to give every Python script a full copy of an entire specific Python runtime (via venv) is a mild annoyance as a design pattern... to me . Python scripting today requires shipping your development environment. Python is wonderful until you want to run that code on another machine. At that point, the target system has to venv their way into reproducing your environment…
Yeah, I agree with this. I typically dockerize where appropriate to sidestep this a little, but very often rewrite everything into a more friendly language like Go if I am intending to ship software to other machines. The latter is obviously painful if I’m making heavy use of Python specific libraries that do a lot of heavy lifting like Numpy, if those features aren’t in something like GoNum.
Does docker fix all the above issues?
Re: Use `Python -m Pip`
#58Where this conversation is inevitably going to go: https://xkcd.com/1987/
This issue does not exist under Linux.
Re: Use `Python -m Pip`
#59Earlier quoted context omitted.
I'm relatively new to python. I use venv, pip and requirements.txt. It's dead simple. What am I missing?
The fact that the suggested solution in Python is to give every Python script a full copy of an entire specific Python runtime (via venv) is a mild annoyance as a design pattern... to me . Python scripting today requires shipping your development environment. Python is wonderful until you want to run that code on another machine. At that point, the target system has to venv their way into reproducing your environment…
sigh