Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Defeat Python "Virtual Environment" in Fedora ? Date: 9 Mar 2026 22:17:07 GMT Lines: 55 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net hivH6BxYydr6PKYF4oNOsw41PtEyXnrymnlscDrbdIdJJeUiV7 Cancel-Lock: sha1:dE8qbJQlj9G0aXJw0nnI0X/sJdQ= sha256:90vI6+W3i7haaqTOGicyE+N81AUhWYk+Q088LcZHpPg= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:82780 On Mon, 09 Mar 2026 16:34:52 GMT, Charlie Gibbs wrote: > On 2026-03-09, rbowman wrote: > >> On Mon, 09 Mar 2026 02:47:51 GMT, Charlie Gibbs wrote: >> >>> I did write a little Python program that played with the various GUI >>> gadgets that it made available (with much less effort than doing it in >>> C). It made me think that I could write something that my wife might >>> actually be able to use. (I was careful to use Python 3, not 2.) >>> It would be nice if this remained a viable option; otherwise it's back >>> to writing Yet Another C Program. >> >> Stick to tkinter and you *should* be good. I say should because 'import >> tkinter' works on Mint, Ubuntu, and Fedora. On Leap you'd have to do >> 'zypper install python-tk' but it would then be global. Arch says it's >> python isn't configured for Tk. > > My little test program uses tkinter, and runs fine on Debian Bookworm. > Looks like a good start... https://www.i-programmer.info/news/216-python/18680-microsoft-unifies- python-environments.html I haven't tried the Python Environments extension in VS Code yet and post this mainly for the xkcd cartoon that I didn't find a direct link for. The extension arrives a little late for me, having been through the degraded Python phase several years ago. Lessons learned: Stick with the Python installed by the distro. It's what the distro uses behind the scenes. Many Python projects are well within the capabilities of the Python itself and the system site-packages. No problem, life goes on as before. Some additional packages can be installed from the distro repositories with something like 'sudo apt install python3-foo'. In that case, no problem, and life goes on... If you want to use PyQt, PySide6, PyGtk, PyTorch, Numpy, and so forth they probably will not be in the distros repositories. Create a venv, activate it, and then use pip to install them. Passing --system-site-packages to venv may or may not been needed. Use 'pip freeze -l' to save a list of what you have installed so you can recreate the venv. Use venv, not virtualenv, conda, or some other scheme. Do not try to game the setup by tweaking environment variables. Probably not necessary if you play by the rules but i use 'python3 -m venv' and 'python3 -m pip' If you've created the xkcd cartoon with 'another pip???' that makes sure that python and that pip are on the same page. Really, it isn't hard.