youtube-dl-gui
youtube-dl-gui copied to clipboard
couldn't install in ubuntu 20.04
Bug report
cant install youtube-dl-gui in ubuntu 20.04. there is a dependency issue of twodict. i tried installing with pip and using source compilation. both failed.
What operating system do you use ?
Ubuntu 20.04
List of actions to perform to reproduce the problem:
- .. install package using pip or setup.py
What is the expected behaviour ?
install correctly
What happens instead ?
showing dependency error and python2 print error
pip3 install youtube-dlg
Collecting youtube-dlg
Downloading Youtube-DLG-0.4.tar.gz (153 kB)
|████████████████████████████████| 153 kB 145 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l3anp9ah/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l3anp9ah/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-l3anp9ah/youtube-dlg/pip-egg-info
cwd: /tmp/pip-install-l3anp9ah/youtube-dlg/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-l3anp9ah/youtube-dlg/setup.py", line 69, in <module>
from youtube_dl_gui import (
File "/tmp/pip-install-l3anp9ah/youtube-dlg/youtube_dl_gui/__init__.py", line 25
print error
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(error)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
when installing through setup.py i get No module named twodict and cant able to install twodic for python2 in ubuntu 20.04
youtube-dl-gui is written in python2 so, at a guess, I would say that installing via pip3 (python3) isn't going to work.
Try pip install youtube-dlg
perhaps.
It's not that easy, @axcore .
You'd need pip
first. And while pip3
is available in the repos, pip
is not.
For this, I had to follow the instructions posted here.
And even then it doesn't work.
chris@locahorst:~$ pip install youtube-dlg
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting youtube-dlg
Downloading Youtube-DLG-0.4.tar.gz (153 kB)
|████████████████████████████████| 153 kB 175 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-AXswYF/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-AXswYF/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-29dBPH
cwd: /tmp/pip-install-AXswYF/youtube-dlg/
Complete output (1 lines):
No module named twodict
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
So I installed TwoDict using pip too (it vanished from the ubuntu repos - alongside pip). Horray! ... a new error message
chris@locahorst:~$ pip install youtube-dlg
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting youtube-dlg
Using cached Youtube-DLG-0.4.tar.gz (153 kB)
Building wheels for collected packages: youtube-dlg
Building wheel for youtube-dlg (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-HqKuPh
cwd: /tmp/pip-install-HgoCiU/youtube-dlg/
Complete output (6 lines):
running bdist_wheel
running build
running build_bin
running build_trans
building MO file for 'youtube_dl_gui/locale/ko_KR/LC_MESSAGES/youtube_dl_gui.po'
could not locate file 'msgfmt', exiting...
----------------------------------------
ERROR: Failed building wheel for youtube-dlg
Running setup.py clean for youtube-dlg
Failed to build youtube-dlg
Installing collected packages: youtube-dlg
Running setup.py install for youtube-dlg ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fFLx1Q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chris/.local/include/python2.7/youtube-dlg
cwd: /tmp/pip-install-HgoCiU/youtube-dlg/
Complete output (6 lines):
running install
running build
running build_bin
running build_trans
building MO file for 'youtube_dl_gui/locale/ko_KR/LC_MESSAGES/youtube_dl_gui.po'
could not locate file 'msgfmt', exiting...
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HgoCiU/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fFLx1Q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/chris/.local/include/python2.7/youtube-dlg Check the logs for full command output.
And no, I can't install msgfmt with pip.
Sidenode
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Maybe it's time to move away from Python2? Maybe even away from Python itself? Just an idea ...
// Edit: @axcore provided a link in #444 https://github.com/axcore/tartube is IMHO a better choice.
you can download the .deb and install it, and you might ran into some issues regarding paython-twodict to avoid it you need to install it too, following are the deb files i used.
@ajithrn tbh: The devs should drop Python 2. Period. Python 2 reached End Of Life (EOL) And I don't care what it is, once it reached EOL, it has to be upgraded or one has to pay for further support. That applies at least to the professional world. Windows 7? People loved it. But it reached EOL and had to be replaced. Is everyone happy with it? No, of course not. Will everyone switch to Windows 10? No, of course not. But they have nobody to blame, if someone uses an exploit for Win7 and harms their IT.
Look at other active maintained Open Source Projects like WordPress. I quote from their website:
We recommend servers running version 7.3 or greater of PHP and MySQL version 5.6 OR MariaDB version 10.1 or greater.
Meaning PHP 7.2 or even below that is no longer supported (or at least not recommended). And according to the (Supported Versions of PHP](https://www.php.net/supported-versions.php) PHP 7.2 is still maintained - even if only for security fixes.
I checked Drupal as well. They too recommend PHP 7.3+ and anything below is not recommended or simply doesn't work anymore.
I happen to work in the IT and we have customers with an old version of WordPress with an even older version of PHP (5.6 i.e.). They have to pay their hoster for this.
And I'm pretty sure, most other Python 2 projects moved on as well. BTW: If you looked at #444 you'll notice that this very project is not maintained anymore. So move on and simply ditch it.
I don't have the time, money nor the required patience to deal with dead projects. I'd rather stick to https://github.com/axcore/tartube and be done with it. It looks better in any way, it uses Python 3, manages your Downloads and if you don't want it to do that, you can still use the old style since even this is implemented.
So ... why should I fight with an inferior project?
@anihex yes i agree, and its seems like the projects is abandoned , i just wanted to say its possible to install and use the app, the other one you mentioned its cluttered and way too many options for my likings.
@ajithrn I installed the two deb packages, and while it appears YouTube DL GUI is installed, I cannot open the program.
Did they abandon youtube-dl-gui ? I can't get it installed on Ubuntu 20.04
ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-n6mrmavu/youtube-dlg/setup.py'"'"'; __file__='"'"'/tmp/pip-install-n6mrmavu/youtube-dlg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-n6mrmavu/youtube-dlg/pip-egg-info cwd: /tmp/pip-install-n6mrmavu/youtube-dlg/ Complete output (8 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-n6mrmavu/youtube-dlg/setup.py", line 69, in <module> from youtube_dl_gui import ( File "/tmp/pip-install-n6mrmavu/youtube-dlg/youtube_dl_gui/__init__.py", line 25 print error ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(error)? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.