Path: csiph.com!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: jkn Newsgroups: comp.lang.python Subject: Re: ModuleNotFoundError for youtube_dl Date: Tue, 10 Dec 2024 22:35:22 +0000 Organization: A noiseless patient Spider Lines: 41 Message-ID: References: <52495180-0498-4819-9baf-8e6a0717a26d@gmail.com> <0ef85f40-9617-4097-bc86-9dffd02ea15f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 10 Dec 2024 23:35:51 +0100 (CET) Injection-Info: dont-email.me; posting-host="f49fc34f262dd58e263b9ecff07b503f"; logging-data="1224712"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1801ns7rd6r/uMlnBk3fDAl" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:SIEn99YXgeqBN4hHH+c+z3Fi9FA= Content-Language: en-US In-Reply-To: Xref: csiph.com comp.lang.python:197051 On 10/12/2024 01:41, Tim Johnson wrote: > > On 12/9/24 14:59, Tim Johnson wrote: >> >> Recently did a refresh of ubuntu 24.04 >> >> With no code changes am now getting a *ModuleNotFoundError *for >> youtube_dl >> >> Relevant code is >> >> import sys >> sys.path.append("/home/tim/.local/share/pipx/venvs/youtube-dl/lib/python3.12/site-packages/youtube_dl") >> >> import youtube_dl ' >> >> Navigating to >> /home/tim/.local/share/pipx/venvs/youtube-dl/lib/python3.12/site-packages/youtube_dl, >> >> I see the following >> >> tim@beelink:~/.local/share/pipx/venvs/youtube-dl/lib/python3.12/site-packages/youtube_dl$ ls >> aes.py    compat.py   extractor    jsinterp.py  options.py >> __pycache__  swfinterp.py  utils.py    YoutubeDL.py >> cache.py  downloader  __init__.py  __main__.py  postprocessor >> socks.py     update.py     version. >> > I should not have appended 'youtube_dl' to the path. I used the content > from > /home/tim/.local/share/pipx/shared/lib/python3.12/site-packages/pipx_shared.pth > > ("/home/tim/.local/share/pipx/shared/lib/python3.12/site-packages") and > added that to /usr/lib/python3.12/sitecustomize.py as appended to sys.path > > and it appears to be solved. FWIW I think youtube_dl has largely been supplanted by the (maintained) 'yt-dlp' these days J^n