> This PEP proposes extending the existing mechanism for setting up sys.path to include a new __pypackages__ directory, in addition to the existing locations. The new directory will be added at the start of sys.path, after the current working directory and just before the system site-packages, to give packages installed there priority over other locations.
> This is similar to the existing mechanism of adding the current directory (or the directory the script is located in), but by using a subdirectory, additional libraries are kept separate from the user’s work.
The interference with virtual environments makes this a non-starter.
The newbie (not to mention the data scientist) is always looking for a way to trash their Python environment.
Now they use
pip install
outside a venv or (worse)
pip install —user
which is truly a weapon of mass destruction. Both of these are globally harmful and Python is right to stop the insanity by making pip not work outside of a venv.
If Python lets the insanity comes back, a fresher will now trash their local environment and then flail around like a fish out of water because they forgot to make a venv before they start their Python.
What people don’t get is that the burden of using venv’s is finite, but the amount of trouble you get into for not using venv’s is infinite. Engineering managers are giving up on Python because they can’t successfully get code from developers into production and the main problem is the recalcitrance of the developers and refusal to follow good practices. It’s little understood that there is a small (literally a handful) of problems that make Python undeployable and make the gap from projects one person works on to ones that two persons work on look unbridgeable.
If the Python community accepted solutions to these problems instead of 90% non-solutions, Python would get a reputation for being easy to use from start to finish and not the abomination against software engineering that people perceive that it is.
3 comments
[ 5.2 ms ] story [ 17.2 ms ] threadAnd for quick reference, the abstract:
> This PEP proposes extending the existing mechanism for setting up sys.path to include a new __pypackages__ directory, in addition to the existing locations. The new directory will be added at the start of sys.path, after the current working directory and just before the system site-packages, to give packages installed there priority over other locations.
> This is similar to the existing mechanism of adding the current directory (or the directory the script is located in), but by using a subdirectory, additional libraries are kept separate from the user’s work.
https://peps.python.org/pep-0582/
The newbie (not to mention the data scientist) is always looking for a way to trash their Python environment.
Now they use
outside a venv or (worse) which is truly a weapon of mass destruction. Both of these are globally harmful and Python is right to stop the insanity by making pip not work outside of a venv.If Python lets the insanity comes back, a fresher will now trash their local environment and then flail around like a fish out of water because they forgot to make a venv before they start their Python.
What people don’t get is that the burden of using venv’s is finite, but the amount of trouble you get into for not using venv’s is infinite. Engineering managers are giving up on Python because they can’t successfully get code from developers into production and the main problem is the recalcitrance of the developers and refusal to follow good practices. It’s little understood that there is a small (literally a handful) of problems that make Python undeployable and make the gap from projects one person works on to ones that two persons work on look unbridgeable.
If the Python community accepted solutions to these problems instead of 90% non-solutions, Python would get a reputation for being easy to use from start to finish and not the abomination against software engineering that people perceive that it is.