I don’t have anything against VENV but I’m trying to find a way to use Thonny until they get their issues with VENV sorted out.
I’m running on Linux MINT and they don’t recommend globally defeating VENV since this could impact any system level Python programs they have. The alternative they say is to install a personal use version of Python. My system already has 12.8.3 installed at the system level.
My assumption is that if I install and run locally, I will not have VENV enforced; correct?
I just downloaded the TAR file for 3.13.1. I looks like I need to do the following
./configure --prefix=/home/paul/.local/bin
make
make test
make install
I dropped the SUDO off the ‘make install’ since it’s local. Is that correct?
Yes, that should be correct. (In fact, “sudo make install” would cause a lot of hassles; it’s definitely better to run it as yourself when installing into your own home directory.)
I had to abandon my install attempts because of lack of knowledge on how to connect things together in the install configure. Specifically, from the output of running configure:
OpenSSL 3.0.13 is installed but ssl.h could not be found. I found it in /var/lib/flatpak/runtime/org.freedesktop.Sdk but that does seem like an appropriate directory to use. Also found a _ssh.h in /home/paul/Downloads/Python-3.13.1/Modules which is the extract location.
I installed SQLITE3 but it shows as disabled. I was able to open it from a terminal.
tkinter is installed. With the existing Python I can successfully run ‘python -m tkinter’. configure shows it as missing.
So I think I’m going to abandon this and use the free version of PyCharm which does with VENV. I prefer Thonny.
Hi Rob. Thanks for taking the asking the question. My Google showed that others were having problems with Thonny with VENV with one comment, which sounded like a Thonny developer, was that they are working on it.
As mentioned, I’m running Linux Mint MATE edition which has a Software Manager. I assume a GUI front end to ‘apt’. I installed Thonny 4.1.6 from there. Python 3.12.3 was already installed with the enforcement of VENVs.
I created an empty directory $HOME/src/test_venv_lm and had Thonny create a new virtual environment in it. That worked and here is how the Interpreter page looked after.
I then went into Manage Packages and tried to search for a package. I received the following error message and the Manage Package was greyed our after.
PROBLEM IN THONNY'S BACK-END: Exception while handling 'get_active_distributions' (ModuleNotFoundError: No module named 'pkg_resources').
See Thonny's backend.log for more info.
Process ended with exit code 1.
That stopped me from progressing and start Googling and my conclusion of broken Thonny.
This time I opened a terminal windows, activated the VENV and was able to use ‘python -m pip {pkg}’ to load the module I needed. It then worked in the Python Program I used in Thonny.
So, thanks to you asking the question, and me looking deeper, I now have a work around I can use.
Your on thonny 4.1.4 and im on 4.1.7. I notice in the change log that a fix was made to package search which sounds like it may be the issue your having.