![]() And check this other tutorial to change the default Python version. Read this article to avoid making a mistake. Note: At the time of writing, Python 2 and 3 are installed on Raspberry Pi, make sure to install the packages for the version you are using in your script. ![]() A few seconds later, the package is installed and ready to use in Python.Check the corresponding box and click on “Apply” to install it on your system.The tool will show you the corresponding packages:.Type the library name you are looking for in the search engine.On Raspberry Pi OS with Desktop, open the Add / Remove Software tool.Install new Python packages on Raspberry Pi You don’t need any library to create your first script. I recommend starting here, where I explain the basics of Python. OpenCV: Looking for something more advanced? OpenCV is a computer vision library that you can use to experiment with machine learning.Ĭheck my tutorial to learn how to setup OpenCV on your Raspberry Pi.Īnd by the way, if you are entirely new to Python, it’s probably not the first tutorial you should read on this website. ![]() Read my tutorial here to get started with Minecraft and Python. It’s a limited but comes with a Python library to interact with the game, which is a great way to get started with Python, especially for kids. Minecraft Pi: Minecraft was preinstalled on Raspberry Pi on previous Raspberry Pi OS version.Gui Zero: The example I take in the next section, it’s an easy way to create a basic user interface in Python (forms, buttons, etc.).You can read my tutorial h e re if you are interested, I explain everything on how to use this fantastic extension. Sense HAT: It’s the most popular HAT for Raspberry Pi, and there is a great module available for it.Then, here are a few interesting Python libraries you can use with the method explained below: It’s always better to start with a goal in mind and build something from there, rather than trying things without clear objectives. The next section works well when you have a specific Python module that you are interested in (and which is available in the repositories), but maybe you are just looking for ideas and don’t know which packages you should install.įirst, I recommend starting by reading this article that gives 15 cool Python project ideas on Raspberry Pi. ![]() If like me, you always mix the languages syntax, download my cheat sheet for Python here!ĭownload it now Recommended Python libraries on Raspberry Pi I’ll explain how to do this with the “Add / Remove Software” tool or the “apt” command line directly, but the first thing to know is the package name you need to install. It’s possible to create Python libraries yourself when you work on big projects, but most of the time, you’ll just download and install packages available in the Raspberry Pi OS repositories. By using this kind of module, you don’t need to code the same functions in every new project. For example, a Python library can help with mathematics functions, interaction with an API, or a specific accessory. Find Python packages on Raspberry PiĪ Python package is created to have reusable code at hand in any project. The most common Python libraries will be available in the repositories, often named something like “python3-library”. The easiest way to install new Python packages is to use APT (or the graphical version of it: “Add/Remove Software”). Get 10% off by downloading it today! Install Python packages on Raspberry Pi Raspberry Pi without Python is like a car without an engine, you miss all the fun parts. It will guide you step-by-step to learn the essential concepts (and only the essential concepts) required to achieve any project in the future. I’ll start with APT because most modules can be installed with it, then I’ll introduce PIP and will conclude with a few tips on how to manage your Python libraries.īy the way, if you get overwhelmed as soon as Python is required for a project, I recommend checking out my e-book “ Master Python on Raspberry Pi“. Another tool named “PIP” can also be used for some other modules not included in the default repositories.Įither way, I’ll explain everything in this article. Searching for the library name with this tool will be the fastest way to install them. Most of the Python packages for Raspberry Pi are available in the APT repositories. Even if you are good with Python, you might need some help knowing how to install new packages for Python on Raspberry Pi, which is exactly why I wrote this article. ![]() Python is already installed on Raspberry Pi, but using it to create scripts and build various projects will often require some dependencies named libraries or modules. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |