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: 8 Mar 2026 18:57:07 GMT Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net xVS6O1ZrwVTlJa6FFPn+AAR69Of5sqvCHrs92BfLd4VYG+EdjS Cancel-Lock: sha1:5Ggi2Gsr5iTqy8Ty4DH27naX7hg= sha256:7YBmBFVSuh+MrnxRt+v1wy7otRfY6Tx8emC8+JfvpEM= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:82659 On Sun, 8 Mar 2026 05:31:16 -0400, c186282 wrote: > Alas Python is no longer "real" ... lives in a horrible "virtual > environment" that seems to lock out a lot of useful stuff "for your > safety". I started using venvs long ago but it is getting more painful. One thing I've started doing is python3 -m venv foo --system-site-packages At least on Linux it's symlinks and not copying all the files. That saves a lot of annoyances. After activating pip freeze -l > requirements.txt You should do that anytime you install something with pip. The '-l' will only list what you've installed in that environment. Without it lists all the system packages too. I've been burned when a distro upgrade introduces a new Python version or if I want to move a venv. After creating a new venv and activating pip install -r requirements.txt pulls in everything you'd installed in the original. Then you can blow it away. Sometimes 'sudo apt install python3-some_package' works and adds it to the system packages but it doesn't work for a lot of them. There are some other flags that are useful like 'pip install foo -- upgrade' I've also been playing with uv. https://docs.astral.sh/uv/ It makes it easier to work with multiple Python versions, like nvm for multiple node.js versions. I haven't tried it on the Fedora box but the upgrade to 43 installed Python 3.14. Fine and dandy except the maintainers of PySide6 and some other packages hadn't upgraded to work with 3.14. It took me a while to figure out the problem from the errors thrown by pip install. All in all the environments are a good thing. I think virtualenv will still work although venv is preferred. Personally I stay away from conda. There are packages that aren't available from conda-forge and it doesn't play very well with a normal Python install.