8/7/2023 0 Comments Thonny pythonYou can also install Thonny Python IDE using the Linux installer script. Python pip is a package management tool used to find, install, remove and list the packages from the Python Package Index (PyPI).įirst, install the Python pip on your system and then use the following command to install Thonny using pip – pip3 install thonny Method 3: Installing Thonny using the installer script Next, use the following command to install Thonny on your system – sudo apt install python3-tk thonny -y Method 2: Installing Thonny using pip Thonny is available in the official Ubuntu repository you can use the apt package manager to install it on your system.īefore installing the package update your system repository index – sudo apt update Method 1: Installing Thonny from the Ubuntu repository There are multiple ways to install and use Thonny IDE in Ubuntu you can follow any one of the given methods to install it on your system. Access to a user account that has superuser privileges.A system running a recent version of Ubuntu.To follow this guide you should have the following. It has support for CPython and MicroPython.Stepping through evaluation of expressions.You may also want to be able to easily wipe the environment and all installed packages when you are done. Why do this? Because you might have projects that depend on different versions of the same package. Packages will be installed inside the virtual environment instead of system-wide on your Pi. You can now begin installing the packages your project needs. Your interpreter will automatically update in the REPL window.Ĭonfirm this by looking at the initial line in the REPL which should show /home/pi/my-python-project/.venv/bin/python3. Navigate into the newly created directory and click the OK button.Ĭlick the OK button in the Thonny options window to save your changes. You should now have new a directory called /home/pi/my-python-project/.venv. So if your project lives at /home/pi/my-python-project then navigate there and create the directory. We prefer to create the virtual environment directory as a hidden directory at the root of our project. Click the link to select a location for your new virtual environment. A new dropdown will appear in the window along with the link New virtual environment. Click on the dropdown called Which interpreter or device should Thonny use for running your code? and select Alternative Python 3 interpreter or virtual environment. Create a new virtual environmentĬlick Tools ➔ Options… and then select the Interpreter tab. Don’t worry, you don’t have to be a Python expert to use Thonny in expert mode. Once Thonny starts back up, click on Tools ➔ Options… and on the General tab, click UI Mode and select expert. In order to do this, click on Switch to regular mode in the top right corner of the toolbar. The first thing we need to do is to enable expert mode. This diverges a bit from other applications and IDEs that usually honor Pipenv or Poetry virtualenv configurations.Īfter this discovery, we started exploring the configuration section of Thonny to learn more about how it handles environments so that we could give our friend instructions. Turns out, Thonny has a built-in system that it uses to manage virtual environments. We installed said application, Thonny, on our Raspberry Pi and fired it up to try to figure out why it was not honoring the virtualenv directory created by Poetry. We recently helped an online friend with an application that was completely new to us.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |