Hey smart people of the Internet. It seems like things have changed (for the worse) in newer #Python. I am trying to install #wxPython like I always have been doing, per https://wxpython.org/pages/downloads/

pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04 wxPython

And it is suddenly yelling at me to not install the exact way I have been installing this for years and years. What is the new cool hip way they want me to do this? Preferably uncomplicated. #ubuntu #gnu #linux #programming

wxPython Downloads

Current Release Starting with wxPython 4.0 (the first Phoenix release) the wxPython source archive and, for supported platforms, wxPython binary wheels are available from the Python Package Index (PyP

wxPython

@RomanOnARiver So here's the thing: don't assume that any time you're asked to do something differently it's a change for the worse. (see also https://xkcd.com/1172/) You didn't say what pip is actually saying when it yells at you, but if it's the thing that most often generates these kinds of complaints - the "externally managed environment" warning message - you were doing it wrong all along, and pip just never told you before.

The new way is to use a virtual environment for each situation where you need to install things. There are many ways to create and manage virtual environments - the simplest being `python -m venv <path>` - and once you have one, you can use pip to install your packages in that environment, e.g. with `<path>/bin/python -m pip install wxPython`. (Or `<path>/bin/pip install wxPython` probably works too, but there are some weird niche cases where that runs into trouble.)

#Python

Workflow

xkcd
@diazona thanks for responding, what is the location for the path people typically use?
@diazona also, to be fair, I'm just following the documentation from the package itself that said to do that. Plenty of python modules are still like hey just install this with pip.
@diazona for example another one I need to use is appdirs, documentation says just use pip https://pypi.org/project/appdirs/
appdirs

A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".

PyPI
@diazona or sorry, platformdirs is the up to date fork I guess. Same difference https://pypi.org/project/platformdirs/
platformdirs

A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`.

PyPI

@RomanOnARiver Yeah, unfortunately it is a thing that a lot of documentation is out of date with respect to modern packaging standards. Much has changed over the last 5-ish years.

Any time a package tells you to install it with pip, you should take that to mean "install with a pip-compatible tool into a virtual environment". The pip-compatible tool might be pip itself, or pipenv, or uv, or poetry, or so on. (Don't worry about what all these do, just be aware that there are different ones.) If there is such a thing as a package that actually needs to be installed globally, using your system's pip, that package should make that very obvious in its documentation - but I have never seen such a thing.

#Python