LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2023, 12:25 AM   #16
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119

Quote:
Originally Posted by jbuckley2004 View Post
Youtube-dl is now working for me, again. I'm not sure when the problem disappeared, but it was probably this morning perhaps after an update and reboot (my habit is to that every couple of days or so).
However, I've also been having problems with my third-party e-mail client too (in this case the version used by Fedora 37 kde). I've been able to get to email (AOL) using the browser, but not Thunderbird. I'm not sure where the problem might be. This one has been hard to track down.
Still not working for me. Weird.
 
Old 04-05-2023, 07:48 AM   #17
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Quote:
Hmmmmm...interesting idea! I could just find the simplest distro that runs Python 3.7.
Why? All of the python scripts/programs that you want to use are going to be updated to run in python3.10/11

Python changes all the time with no regard for backwards compatibility. So do all of the python modules. Qt5, Qt6, gobject, webengine, ect.

Right now you should be using at least python 3.10. Python2 was EOL a good while back. If there is any software that still uses python2 then leave it.

If you have a python script that will only run in python 3.5 for example. Then update it, so that it is modern, and will run using python3.10, or use something else.

Python scripts go bad a lot quicker than a c or c++ source code.

youtube-dl is not being maintained. Youtube changes all the time. If you have a 3 month old version of yt-dlp or youtube-dl, it likely won't work.

Update your box. That is the solution.
 
Old 04-05-2023, 09:02 AM   #18
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
I recommend you to download and install your own Python, as you don't like OS upgrades. That's what I did a couple weeks ago when I noted that youtube-dl stopped working with youtube. The advantage is that now it works with 100% speed, instead providing 40-80kbs.
 
Old 04-05-2023, 10:39 AM   #19
jbuckley2004
Member
 
Registered: Aug 2004
Distribution: Fedora (KDE spin)
Posts: 224

Rep: Reputation: 70
Coltson, Python is already installed on my system (Dell Inspiron 5000, F37 KDE). In fact, I think I might have seen (many uncertainties here) that Python is the source of the problem. Sorry I can't be more specific ATM. And I don't mind OS upgrades. It appears to be Discover (or upgrades via Discover) that caused the problem, somehow.
BTW, I'm not seeing this problem on my HP laptop.
 
Old 04-05-2023, 08:33 PM   #20
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by teckk View Post
Why? All of the python scripts/programs that you want to use are going to be updated to run in python3.10/11

Python changes all the time with no regard for backwards compatibility. So do all of the python modules. Qt5, Qt6, gobject, webengine, ect.

Right now you should be using at least python 3.10. Python2 was EOL a good while back. If there is any software that still uses python2 then leave it.

If you have a python script that will only run in python 3.5 for example. Then update it, so that it is modern, and will run using python3.10, or use something else.

Python scripts go bad a lot quicker than a c or c++ source code.

youtube-dl is not being maintained. Youtube changes all the time. If you have a 3 month old version of yt-dlp or youtube-dl, it likely won't work.

Update your box. That is the solution.
Trouble is, my OS is long past EOL, and at this point, the only way to update is to do a fresh install...which is probably what I'll have to do. Guess I'll have to get a USB HDD or something so I can back-up my data.....

Quote:
Originally Posted by coltson View Post
I recommend you to download and install your own Python, as you don't like OS upgrades. That's what I did a couple weeks ago when I noted that youtube-dl stopped working with youtube. The advantage is that now it works with 100% speed, instead providing 40-80kbs.
If I could figure out how to do that, that'd be the ticket. Then again...my old OS probably doesn't have the proper dependencies......

Quote:
Originally Posted by jbuckley2004 View Post
Coltson, Python is already installed on my system (Dell Inspiron 5000, F37 KDE). In fact, I think I might have seen (many uncertainties here) that Python is the source of the problem. Sorry I can't be more specific ATM. And I don't mind OS upgrades. It appears to be Discover (or upgrades via Discover) that caused the problem, somehow.
BTW, I'm not seeing this problem on my HP laptop.
My problem is that I could only get Python to upgrade to 3.5, because the repos for my old OS are no longer maintained, and I'd have to do a fresh install of the newer version of the OS (BunsenLabs)... Looks like I'm at a dead end. So close...and yet so far!
 
Old 04-05-2023, 08:41 PM   #21
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Hmm.. Perhaps installing docker then pulling down the dependencies within a container will help? I inherited a lot of old machines running old linux that expired AGES ago that I threw containers on to solve these kinds of issues.

But honestly - getting your OS upgraded is the way out of this. You're just going to keep running into more and more problems keeping an expired version around. Today its youtube-whatever, tomorrow its kerneld.

Last edited by szboardstretcher; 04-05-2023 at 08:43 PM.
 
Old 04-06-2023, 08:28 AM   #22
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,612

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by Sumguy View Post
Trouble is, my OS is long past EOL, and at this point, the only way to update is to do a fresh install...which is probably what I'll have to do. Guess I'll have to get a USB HDD or something so I can back-up my data.....
Buy a new SSD and swap the drives over - then you can do a fresh install without affecting your previous setup, and afterwards copy the data you want from the old drive.


However, both Youtube-DL and yt-dlp have two versions - one which uses an already installed Python, and one which bundles its own Python...

 
Old 04-06-2023, 11:17 AM   #23
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Platform-independent zipimport binary. Needs Python (recommended for Linux/BSD)
https://github.com/yt-dlp/yt-dlp/rel...ownload/yt-dlp
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
...
content-length: 2747279
Linux standalone x64 binary
https://github.com/yt-dlp/yt-dlp/rel...d/yt-dlp_linux
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux
...
content-length: 29333576
Linux standalone aarch64 (64-bit) binary
https://github.com/yt-dlp/yt-dlp/rel..._linux_aarch64

Source tarball
https://github.com/yt-dlp/yt-dlp/rel.../yt-dlp.tar.gz
 
Old 04-06-2023, 01:52 PM   #24
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by szboardstretcher View Post
Hmm.. Perhaps installing docker then pulling down the dependencies within a container will help? I inherited a lot of old machines running old linux that expired AGES ago that I threw containers on to solve these kinds of issues.

But honestly - getting your OS upgraded is the way out of this. You're just going to keep running into more and more problems keeping an expired version around. Today its youtube-whatever, tomorrow its kerneld.
Hehyepyepyep...I'm beginning to think that just doing a fresh install would be no more trouble than trying a million work-arounds.

Quote:
Originally Posted by boughtonp View Post
Buy a new SSD and swap the drives over - then you can do a fresh install without affecting your previous setup, and afterwards copy the data you want from the old drive.


However, both Youtube-DL and yt-dlp have two versions - one which uses an already installed Python, and one which bundles its own Python...

Oooo! The SSD thing is a great idea! I may just do that.
Any idea where I find the yt-dlp with it's own Python, that can be simply installed (like with 'curl') by a dummy?

Quote:
Originally Posted by teckk View Post
Platform-independent zipimport binary. Needs Python (recommended for Linux/BSD)
https://github.com/yt-dlp/yt-dlp/rel...ownload/yt-dlp
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
...
content-length: 2747279
Linux standalone x64 binary
https://github.com/yt-dlp/yt-dlp/rel...d/yt-dlp_linux
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux
...
content-length: 29333576
Linux standalone aarch64 (64-bit) binary
https://github.com/yt-dlp/yt-dlp/rel..._linux_aarch64

Source tarball
https://github.com/yt-dlp/yt-dlp/rel.../yt-dlp.tar.gz
Will that work with my older Python? I may just give that a try before giving up. Thanks.

Thanks to all who have responded so far. There have been some very good ideas and comments; and as always here, it's been fun!
 
Old 04-06-2023, 02:11 PM   #25
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by teckk View Post
Platform-independent zipimport binary. Needs Python (recommended for Linux/BSD)
https://github.com/yt-dlp/yt-dlp/rel...ownload/yt-dlp
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
...
content-length: 2747279
Linux standalone x64 binary
https://github.com/yt-dlp/yt-dlp/rel...d/yt-dlp_linux
Code:
curl -LI https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux
...
content-length: 29333576
Linux standalone aarch64 (64-bit) binary
https://github.com/yt-dlp/yt-dlp/rel..._linux_aarch64

Source tarball
https://github.com/yt-dlp/yt-dlp/rel.../yt-dlp.tar.gz
Tried it. Got the same errors I got with my previous yt-dlp install, which I assume is due to my outdated Python....
 
Old 04-06-2023, 04:52 PM   #26
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,612

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by Sumguy View Post
Any idea where I find the yt-dlp with it's own Python, that can be simply installed (like with 'curl') by a dummy?
Instead of the 2-3MB file, it's the >20MB file - check the readme "Release Files" section - and pick the link that includes "Linux" and "standalone" and matches your architecture (probably x64, unless you've got an arm device).

Quote:
Originally Posted by Sumguy View Post
Tried it. Got the same errors I got with my previous yt-dlp install, which I assume is due to my outdated Python....
Do you mean the "unable to extract uploader id" - that might be video/URL specific - test with some different ones?

Also, I notice yt-dlp's differences in default behaviour has some new compat options - maybe newer ones are depending on newer Python functionality, so see if adding "--compat-options 2021" or "--compat-options youtube-dl,2021" makes a difference?

Otherwise, what's the error, and which of the links did you try? (you probably want the second one in Teckk's post).


Last edited by boughtonp; 04-06-2023 at 04:54 PM.
 
Old 04-07-2023, 07:17 AM   #27
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Quote:
Originally Posted by jbuckley2004 View Post
Coltson, Python is already installed on my system (Dell Inspiron 5000, F37 KDE). In fact, I think I might have seen (many uncertainties here) that Python is the source of the problem. Sorry I can't be more specific ATM. And I don't mind OS upgrades. It appears to be Discover (or upgrades via Discover) that caused the problem, somehow.
BTW, I'm not seeing this problem on my HP laptop.
Hi. Actually, I was thinking into Sumguy when I did my post, sorry for the confusion

Quote:
Originally Posted by Sumguy View Post
If I could figure out how to do that, that'd be the ticket. Then again...my old OS probably doesn't have the proper dependencies......
Yes, that's the difficult. While Python can be build without any special dependency, building it that way will result in a Python without OpenSSL, which means no yt-dlp.

So for running yt-dlp, one needs to build Python with ssl suport activated, which means one needs to install OpenSSL devel package (or whatever your distro name it) or to build it from the source before building Python.

However, I would try this yt-dlp with Python before going my route.

Last edited by coltson; 04-07-2023 at 07:19 AM.
 
Old 04-07-2023, 02:15 PM   #28
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by boughtonp View Post
Instead of the 2-3MB file, it's the >20MB file - check the readme "Release Files" section - and pick the link that includes "Linux" and "standalone" and matches your architecture (probably x64, unless you've got an arm device).


Do you mean the "unable to extract uploader id" - that might be video/URL specific - test with some different ones?

Also, I notice yt-dlp's differences in default behaviour has some new compat options - maybe newer ones are depending on newer Python functionality, so see if adding "--compat-options 2021" or "--compat-options youtube-dl,2021" makes a difference?

Otherwise, what's the error, and which of the links did you try? (you probably want the second one in Teckk's post).

Here are the errors I'm getting with yt-dlp:

Code:
$ yt-dlp https://www.youtube.com/watch?v=_2hXBf1DakE
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/yt-dlp/__main__.py", line 14, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 896, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1147, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1123, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1104, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 541, in spec_from_file_location
  File "/usr/local/bin/yt-dlp/yt_dlp/__init__.py", line 5
    f'You are using an unsupported version of Python. Only Python versions 3.7 and above are supported by yt-dlp')  # noqa: F541
                                                                                                                ^
SyntaxError: invalid syntax
(I like how they slip that "f'you" in there... I think they're trying to tell me something!)
 
Old 04-07-2023, 04:20 PM   #29
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Can't you get Python 3.7 or above on BunsenLabs? You can have Python 2 & 3 installed.
 
Old 04-07-2023, 06:50 PM   #30
Sumguy
Member
 
Registered: Jul 2010
Location: Rural Kentucky, USA.
Distribution: BunsenLabs Linux
Posts: 465

Original Poster
Blog Entries: 2

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by brianL View Post
Can't you get Python 3.7 or above on BunsenLabs? You can have Python 2 & 3 installed.
You can...but not on my long out-of-date iteration for which the repositories are no longer being updated. I'm trying to avoid having to do a frsh install of the latest version of Bunsen...but I believe that that is my only option.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Cast YouTube Videos From Your Phone To Raspberry Pi Using YouTube On TV (youtube.com/tv) LXer Syndicated Linux News 0 04-16-2021 01:30 AM
LXer: youtube-dl – download Youtube videos from linux command Line LXer Syndicated Linux News 0 06-24-2014 12:11 PM
LXer: Youtube Downloader (youtube-dl) Helper Script LXer Syndicated Linux News 0 09-28-2013 01:50 PM
LXer: Search YouTube videos on Ubuntu with the YouTube Lens LXer Syndicated Linux News 0 12-30-2011 08:40 PM
LXer: Youtube-dl - Download videos from Youtube in openSUSE LXer Syndicated Linux News 1 08-14-2008 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration