+ 1
installing libraries in Raspberry pi
Anyone knows what is the problem when installing libraries in raspberry pi using python??
1 Answer
+ 2
There isn't a problem installing packages on a Pi. If you are having problems, it's more likely to be an issue with not having proper permissions, etc.
In many cases, users will create virtual environments (venv) and packages are then installed in the user's folders. To install packages to the main python (not venv), you may require root permission. You can try with sudo. But a better solution is usually to use venv and put your packages there.
venv allows you to setup individual environments. This way one app can have what it needs and not be impacted by another app that needs different versions of python or packages. venv does take up slightly more disk space as it copies python and libraries into the user folder. But it is still a best practice so each app has precisely what it needs.
In a perfect world, all your apps will have their own venv. Virtual environments usually exist in a sub-folder of your app's folder.