using python3 breaks youtube-dl in Ubuntu 16.04 #9337

Closed
opened 2026-02-21 03:30:56 -05:00 by deekerman · 4 comments
Owner

Originally created by @baobab33 on GitHub (Dec 2, 2016).

  • I've verified and I assure that I'm running youtube-dl version 2016.11.27

(1:2016.11.27-1~webupd8~xenial0)

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

$ youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.11.27
[debug] Python version 3.5.2 - Linux-4.4.0-47-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.8-0ubuntu0.16.04.1, avprobe 2.8.8-0ubuntu0.16.04.1, ffmpeg 2.8.8-0ubuntu0.16.04.1, ffprobe 2.8.8-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {}

...
<end of log>

Description of your issue

hi, I had to use python 3 instead of 2 (for installing Django framework)

update-alternatives --remove python /usr/bin/python2
update-alternatives --install /usr/bin/python python /usr/bin/python3 100

after that, it is impossible to use youtube-dl, it says there is a module youtube_dl missing in python.

Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 3, in <module>
    import youtube_dl
ImportError: No module named 'youtube_dl'

back to python version 2 solves the issue.

i remain available by email if you need more information

Best regards

Originally created by @baobab33 on GitHub (Dec 2, 2016). - [x] I've **verified** and **I assure** that I'm running youtube-dl version 2016.11.27 ` (1:2016.11.27-1~webupd8~xenial0) ` ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ ] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: ``` $ youtube-dl -v [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.11.27 [debug] Python version 3.5.2 - Linux-4.4.0-47-generic-x86_64-with-Ubuntu-16.04-xenial [debug] exe versions: avconv 2.8.8-0ubuntu0.16.04.1, avprobe 2.8.8-0ubuntu0.16.04.1, ffmpeg 2.8.8-0ubuntu0.16.04.1, ffprobe 2.8.8-0ubuntu0.16.04.1, rtmpdump 2.4 [debug] Proxy map: {} ... <end of log> ``` --- ### Description of your *issue* hi, I had to use python 3 instead of 2 (for installing Django framework) ``` update-alternatives --remove python /usr/bin/python2 update-alternatives --install /usr/bin/python python /usr/bin/python3 100 ``` after that, it is impossible to use youtube-dl, it says there is a module **youtube_dl** missing in python. ``` Traceback (most recent call last): File "/usr/bin/youtube-dl", line 3, in <module> import youtube_dl ImportError: No module named 'youtube_dl' ``` back to python version 2 solves the issue. i remain available by email if you need more information Best regards
Author
Owner

@yan12125 commented on GitHub (Dec 2, 2016):

How did you install youtube-dl?

@yan12125 commented on GitHub (Dec 2, 2016): How did you install youtube-dl?
Author
Owner

@baobab33 commented on GitHub (Dec 5, 2016):

Hello, I installed it via official Ubuntu repositories : sudo apt update
sudo apt install youtube-dlBRgds,Dani   02.12.2016, 12:55, "Yen Chi Hsuan" notifications@github.com:How did you install youtube-dl?—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. 

@baobab33 commented on GitHub (Dec 5, 2016): Hello, I installed it via official Ubuntu repositories : sudo apt update sudo apt install youtube-dlBRgds,Dani   02.12.2016, 12:55, "Yen Chi Hsuan" <notifications@github.com>:How did you install youtube-dl?—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. 
Author
Owner

@yan12125 commented on GitHub (Dec 5, 2016):

It's not recommended to install youtube-dl from apt as Ubuntu does not maintain it well. Uninstall it fom apt and check our recommended installation methods: https://github.com/rg3/youtube-dl/blob/master/README.md#installation

@yan12125 commented on GitHub (Dec 5, 2016): It's not recommended to install youtube-dl from apt as Ubuntu does not maintain it well. Uninstall it fom apt and check our recommended installation methods: https://github.com/rg3/youtube-dl/blob/master/README.md#installation
Author
Owner

@baobab33 commented on GitHub (Dec 5, 2016):

ok, it worksthough, I had to put youtube-dl into /usr/bin instead of /usr/local/bin which path is not recognized by default in Ubuntu Thanks & have a brilliant day ! BRgds,Dani 05.12.2016, 08:24, "Yen Chi Hsuan" notifications@github.com:It's not recommended to install youtube-dl from apt as Ubuntu does not maintain it well. Uninstall it fom apt and check our recommended installation methods: https://github.com/rg3/youtube-dl/blob/master/README.md#installation—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. 

@baobab33 commented on GitHub (Dec 5, 2016): ok, it worksthough, I had to put youtube-dl into /usr/bin instead of /usr/local/bin which path is not recognized by default in Ubuntu Thanks & have a brilliant day ! BRgds,Dani 05.12.2016, 08:24, "Yen Chi Hsuan" <notifications@github.com>:It's not recommended to install youtube-dl from apt as Ubuntu does not maintain it well. Uninstall it fom apt and check our recommended installation methods: https://github.com/rg3/youtube-dl/blob/master/README.md#installation—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread. 
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#9337
No description provided.