Where this conversation is inevitably going to go: https://xkcd.com/1987/
Use `Python -m Pip`
11–20 of 141 posts
Re: Use `Python -m Pip`
#12This is great advice. To tack on: Python has had built-in virtualenv support since 3.3[1], meaning that you can do this: python -m venv env/ ...on any version of Python released in the last decade and get a reasonable virtual environment. To go one step further, you can also have `venv` automatically bring `pip` and `setuptools` to their latest versions: python -m venv --upgrade-deps env/ ...which you should almost a…
Re: Use `Python -m Pip`
#13Pyenv[1] solves the multiple versions of python problem in my experience. You can install the version of python you want and then can set that version globally, per directory, and then use that versions pip or take it further and use a virtualenv/poetry shell. 1: https://github.com/pyenv/pyenv
Re: Use `Python -m Pip`
#14Where this conversation is inevitably going to go: https://xkcd.com/1987/
Re: Use `Python -m Pip`
#15Python 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
As a "professional" python user (who got there in a roundabout way), I'd say the biggest problem with package management is all the conflicting advice and different ways to accomplish the same thing (there are other problems, but they are surmountable). Once you get a workflow down, it ends up being pretty easy to set up and manage an environment for a given project. Not that it's perfect, but I think a lot of the stereotypes about how bad it is come from how bad it appears as you try to converge on a setup that works for you.
Re: Use `Python -m Pip`
#16Re: Use `Python -m Pip`
#17https://bugs.python.org/issue33053
E.g.:
$ echo 'import os; os.execvp("cowsay", ["-", "pwned"])' > pip.py
$ python -m pip --version
_______
-------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||Re: Use `Python -m Pip`
#18Python 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
I think you mean the package management rather than the ecosystem. For all its failings, the python ecosystem (for machine learning / data science in particular) is unmatched, which is why python is so popular. As a "professional" python user (who got there in a roundabout way), I'd say the biggest problem with package management is all the conflicting advice and different ways to accomplish the same thing (there are…
As a tongue-in-cheek reaction, Python espoused "TOOWTDI", or There's Only One Way To Do It :)
reference: https://wiki.python.org/moin/TOOWTDI
The problem is, when it comes to the Python package management ecosystem, there are SO MANY ways to do it. And they aren't equal and require a deep understanding of each tool to select the correct choice.
It is a problem for Python, although I often regrettably see it dismissed as not a true issue because $latest_package_management_system fixes it.
Python has allowed me to be profoundly productive in many ways, but this is a huge sore spot for the Python ecosystem.
Re: Use `Python -m Pip`
#19Python 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
I think you mean the package management rather than the ecosystem. For all its failings, the python ecosystem (for machine learning / data science in particular) is unmatched, which is why python is so popular. As a "professional" python user (who got there in a roundabout way), I'd say the biggest problem with package management is all the conflicting advice and different ways to accomplish the same thing (there are…
I hate the most popular ORM (sqlalchemy) and alembic has a lot of footguns: for instance, if you autogenerate a migration where you change a table name, it will try to drop the old table and create a new one.
In web dev a lot of the OSS community has moved on to more appropriate or exciting languages, so the tools I'd normally reach for frequently are OSS projects that haven't been maintained in seven years.
As for pip: it needs a major version bump that creates a lockfile, or it needs to be intentionally sunset. It's easy for a beginner to start using (part of why it's heavily used), but extremely dangerous because of the lack of guarantees. I wish it didn't have as big of a footprint as it does.
Re: Use `Python -m Pip`
#20I wish there was a way to lock the global python so you couldn't install packages to it by accident
And on Windows, you may have a globally installed Python (though there is little reason to have one instead of the Py launcher), but even if you do it's not a system Python that system components are relying on.