On 11/1/24 08:32, dieter.mau...@online.de wrote:
...
After the recent upgrades I had to install youtube_dl with pipx for the
new python version.
When I ran the script which imported youtube_dl, I got an import error
as it appears the path to the module
was not in sys.path....
I see at several options:
* install `youtoube_dl` where Python looks for it
(you can print `sys.path` to find out all the places
normally checked for importable modules)
* put a (symbolic) link to `youtoube_dl` at a place
where Python looks for modules
* use Pythons' `.pth' feature to tell Python additional
places where to look for modules.
You can place `.pth` files where Python looks for modules
to be imported
InĀ /usr/lib/python3.12/sitecustomize.py I put the following:
import sys
sys.path.append("path to youtube_dl")
# In /usr/lib/python3.12/sitecustomize.py
# Thanks seems to work for me
cheers
--
Tim
thjmm...@gmail.com
--
https://mail.python.org/mailman/listinfo/python-list