Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4929

Beginners • Re: Help with connecting libraries

$
0
0
To be precise, the correct name is 'python module', not 'libraries'. Noproblem with this; many people use these words quite sloppy.

Python has a number of modules which are build-in; there is a builtin list available https://docs.python.org/3/py-modindex.html

So from the list you mention before, at least threading, time, datetime are buildin modules. Just write the import statement and use them.

There are other modules which are packed by the OS-provider into the distribution, gpiozero for the raspberry os(debian) for example. Use 'pip freeze' in a terminal to see what is available. Same as above, just use them.

All the other need to be installed with e.g. pip -install <packagename> . See the home page of the modules for install instructions.

There are rare packages with native compiled libraries which need to be installed with a linux package manager, see the home page of the package when in doubt.

The previous advice about "venv" is important, especially when you want to have programs with different versions of modules. With 'venv' you do not accidentially stop other programs as a side effect from installing other versions of packages.

Statistics: Posted by ghp — Fri Jul 26, 2024 2:19 pm



Viewing all articles
Browse latest Browse all 4929

Trending Articles