We're using a library of our own Python modules & packages.
The Python documentation[0] states that the search path can be extended via <name>.pth files which should be added to specific directories. While the documentation specifically mentions "lib/pythonX.Y/site-packages (on Unix
and macOS)", I found that Debian seems to do this differently:
$ python -c 'import site ; print(site.getsitepackages())' ['/usr/local/lib/python3.11/dist-packages',
'/usr/lib/python3/dist-packages', '/usr/lib/python3.11/dist-packages']
I.e. instead of `site-packages`, it uses `dist-packages` sub-folders.
Given that these sub-folders are managed by Debian/`apt`, where should I place our custom.pth file pointing to other (network drive) folders we would like to include in Python's search paths?
The Python documentation[0] states that the search path can be extended via <name>.pth files which should be added to specific directories.
Given that these sub-folders are managed by Debian/`apt`, where should I place
our custom.pth file pointing to other (network drive) folders we would like to
include in Python's search paths?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (1 / 15) |
Uptime: | 160:38:54 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,056 |
Messages: | 6,416,494 |