

Incidentally you can click on any package to see metadata such as version number, summary and author/s, and dependencies:įor example here you can see that pandas requires numpy among other packages, and that I don't have the latest stable version of pandas installed.Hopefully you will see everything you are expecting! Thonny's package manager will show you all installed packages in the panel on the left.In Thonny's menu, go to Tools > Manage packages. Now let's check that has done the trick.Unless you've installed it somewhere unusual, it's likely to be something like the following:Ĭ:\Users\username\AppData\Local\Programs\Python\Python38\python.exe If yours isn't already in the list of 'known interpreters', select Locate another python.exe and navigate to your Python executable.In the 'Which interpreter or device should Thonny use for running your code?' dropdown, select Alternative Python 3 intepreter or virtual environment.In Thonny's menu, go to Run > Select interpreter.
#Thonny for older python how to
Here's how to do either: Changing Python interpreter in Thonny
#Thonny for older python install
Perhaps the easier approach is to swap back to your previous Python interpreter (installation) - or you could install your required packages for use with Thonny's bundled interpreter. If you find yourself in this situation, there are two things you can do. However if you are moving to Thonny from a different IDE then it can be quite disconcerting! If Thonny is your first experience of Python, then I suppose that bundling Python with Thonny removes the need to install Python separately and eliminates one barrier to entry - a good thing. You will also see this Python installation referred to in Thonny's menus as "the same interpreter which runs Thonny". For reference it is located at:Ĭ:\Users\username\AppData\Local\Programs\Thonny\python.exe If you look at the first line of the screengrab above, you can see that Thonny is telling me that I am using "Python 3.7.7 (bundled)". The reason for this confusion is that Thonny comes with Python 3.7 built in (or 'bundled'), and by default uses this Python installation rather than the one you may have previously been using with a different IDE. I'd installed these packages using pip (not via IDLE) so had assumed they would all be available for use in any IDE, Thonny included. However when I tried to run many of my Python scripts in Thonny I received a 'ModuleNotFoundError' like this:Īnd it wasn't just pandas: none of the packages I had been using with IDLE, from seaborn to matplotlib, were available in Thonny! Running a script that required any of them threw a similar 'ModuleNotFoundError'.

After a while I was ready to move to a different IDE and chose Thonny: still simple, still free, but with some useful features for learners such as the ability to debug step by step without adding breakpoints first. IDLE has the benefit of simplicity, but is perhaps best suited to absolute beginners.


IDLE is the Integrated Development Environment (or IDE) that comes bundled with the default implementation of Python, so I am sure that many new Pythonistas begin their Python journey using IDLE. I was surprised to almost immediately hit a 'ModuleNotFoundError' in Thonny - here's why, and how to fix it. I have been learning Python since the end of last year, and recently moved from IDLE to Thonny.
