Use `Python -m Pip`
snarky.ca
Use `Python -m Pip`
1–10 of 141 posts
Re: Use `Python -m Pip`
#2Re: Use `Python -m Pip`
#3What's not going good, is, in Python, software engineering practice is not something to be a huge concern, so end-user hardly learn the same way about how to do thing "correctly".
That made me sad though.
Re: Use `Python -m Pip`
#4Re: Use `Python -m Pip`
#5Re: Use `Python -m Pip`
#6Python 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 always do, since the versions bundled with your Python distribution are likely to be behind the latest.Re: Use `Python -m Pip`
#7This 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`
#8Re: Use `Python -m Pip`
#9This 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…
If you're on Debian/Ubuntu, you'd first need to install python3-virtualenv. It does say that though IIRC, if you try without it installed.
Re: Use `Python -m Pip`
#10This 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…
If you're on Debian/Ubuntu, you'd first need to install python3-virtualenv. It does say that though IIRC, if you try without it installed.
TL;DR: Install python3-venv, not python3-virtualenv.
(Ubuntu and Debian's decision to break out core parts of the Python standard library has been an unending source of problems. PEP 668[1] is an in-progress effort to better categorize these kinds of distro changes and improve the user experience around them.)
Edit: I should also qualify: virtualenv is still maintained and useful; venv is contains the subset of virtualenv's functionality that 99% of users use.