Youtube-dl: Python not found (18.04)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I have done a clean install of 18.04 LTS.
I then installed youtube-dl using



sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl


When I try to use youtube-dl, I get the following error message:



rudolffischer@HP8770w:~$ youtube-dl -U
/usr/bin/env: ‘python’: No such file or directory


Python 3 seems to be installed



rudolffischer@HP8770w:~$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.


Why?







share|improve this question






















  • What do you see with apt list --installed | grep -i python2?
    – DK Bose
    May 18 at 7:23










  • What about python 2? (python)
    – ubashu
    May 18 at 7:26










  • @ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
    – karel
    May 18 at 7:36










  • @ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
    – DK Bose
    May 18 at 11:05










  • @karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
    – ubashu
    May 19 at 0:33














up vote
1
down vote

favorite












I have done a clean install of 18.04 LTS.
I then installed youtube-dl using



sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl


When I try to use youtube-dl, I get the following error message:



rudolffischer@HP8770w:~$ youtube-dl -U
/usr/bin/env: ‘python’: No such file or directory


Python 3 seems to be installed



rudolffischer@HP8770w:~$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.


Why?







share|improve this question






















  • What do you see with apt list --installed | grep -i python2?
    – DK Bose
    May 18 at 7:23










  • What about python 2? (python)
    – ubashu
    May 18 at 7:26










  • @ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
    – karel
    May 18 at 7:36










  • @ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
    – DK Bose
    May 18 at 11:05










  • @karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
    – ubashu
    May 19 at 0:33












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have done a clean install of 18.04 LTS.
I then installed youtube-dl using



sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl


When I try to use youtube-dl, I get the following error message:



rudolffischer@HP8770w:~$ youtube-dl -U
/usr/bin/env: ‘python’: No such file or directory


Python 3 seems to be installed



rudolffischer@HP8770w:~$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.


Why?







share|improve this question














I have done a clean install of 18.04 LTS.
I then installed youtube-dl using



sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl


When I try to use youtube-dl, I get the following error message:



rudolffischer@HP8770w:~$ youtube-dl -U
/usr/bin/env: ‘python’: No such file or directory


Python 3 seems to be installed



rudolffischer@HP8770w:~$ python3
Python 3.6.5 (default, Apr 1 2018, 05:46:30)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.


Why?









share|improve this question













share|improve this question




share|improve this question








edited May 19 at 0:33









ubashu

2,23221736




2,23221736










asked May 18 at 7:17









jacobacci

112




112











  • What do you see with apt list --installed | grep -i python2?
    – DK Bose
    May 18 at 7:23










  • What about python 2? (python)
    – ubashu
    May 18 at 7:26










  • @ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
    – karel
    May 18 at 7:36










  • @ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
    – DK Bose
    May 18 at 11:05










  • @karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
    – ubashu
    May 19 at 0:33
















  • What do you see with apt list --installed | grep -i python2?
    – DK Bose
    May 18 at 7:23










  • What about python 2? (python)
    – ubashu
    May 18 at 7:26










  • @ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
    – karel
    May 18 at 7:36










  • @ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
    – DK Bose
    May 18 at 11:05










  • @karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
    – ubashu
    May 19 at 0:33















What do you see with apt list --installed | grep -i python2?
– DK Bose
May 18 at 7:23




What do you see with apt list --installed | grep -i python2?
– DK Bose
May 18 at 7:23












What about python 2? (python)
– ubashu
May 18 at 7:26




What about python 2? (python)
– ubashu
May 18 at 7:26












@ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
– karel
May 18 at 7:36




@ubashu Python 2.x is not installed by default in Ubuntu 18.04. The default Python version in Ubuntu 18.04 is Python 3.6 like the code block in the question says. This same Python 3.x package is a dependency of youtube-dl in Ubuntu 18.04.
– karel
May 18 at 7:36












@ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
– DK Bose
May 18 at 11:05




@ubashu you're correct: according to the GitHub page, "It requires the Python interpreter, version 2.6, 2.7, or 3.2+ ..."
– DK Bose
May 18 at 11:05












@karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
– ubashu
May 19 at 0:33




@karel I thought it was.. so it is the default now?... Going the way of Arch Linux - isn't this suppose to be LTS. But there is a good point why they would do that - Python 2 is EOL 2020.
– ubashu
May 19 at 0:33










2 Answers
2






active

oldest

votes

















up vote
5
down vote













youtube-dl can be installed from the default repositories in all currently supported versions of Ubuntu with this command:



sudo apt install youtube-dl 


youtube-dl that is installed by this command should work fine without needing to be updated, except by the usual default software updates.



youtube-dl's self-update mechanism is disabled on Debian-based operating systems. You can update to the latest version of youtube-dl either with pip or by installing the youtube-dl snap package.



sudo apt remove youtube-dl
sudo apt install python3-pip
sudo pip3 install youtube-dl


or



sudo snap install youtube-dl-casept





share|improve this answer


















  • 1




    try to avoid first method which will download older version, it has bugs. Second method will be best.
    – Debian_yadav
    May 18 at 7:51










  • It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
    – karel
    May 18 at 7:53


















up vote
0
down vote













You should be able to run youtube-dl with your version of python by doing:



/your/path/python3 /usr/local/bin/youtube-dl


Find out your python3 path by doing which python3






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037666%2fyoutube-dl-python-not-found-18-04%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote













    youtube-dl can be installed from the default repositories in all currently supported versions of Ubuntu with this command:



    sudo apt install youtube-dl 


    youtube-dl that is installed by this command should work fine without needing to be updated, except by the usual default software updates.



    youtube-dl's self-update mechanism is disabled on Debian-based operating systems. You can update to the latest version of youtube-dl either with pip or by installing the youtube-dl snap package.



    sudo apt remove youtube-dl
    sudo apt install python3-pip
    sudo pip3 install youtube-dl


    or



    sudo snap install youtube-dl-casept





    share|improve this answer


















    • 1




      try to avoid first method which will download older version, it has bugs. Second method will be best.
      – Debian_yadav
      May 18 at 7:51










    • It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
      – karel
      May 18 at 7:53















    up vote
    5
    down vote













    youtube-dl can be installed from the default repositories in all currently supported versions of Ubuntu with this command:



    sudo apt install youtube-dl 


    youtube-dl that is installed by this command should work fine without needing to be updated, except by the usual default software updates.



    youtube-dl's self-update mechanism is disabled on Debian-based operating systems. You can update to the latest version of youtube-dl either with pip or by installing the youtube-dl snap package.



    sudo apt remove youtube-dl
    sudo apt install python3-pip
    sudo pip3 install youtube-dl


    or



    sudo snap install youtube-dl-casept





    share|improve this answer


















    • 1




      try to avoid first method which will download older version, it has bugs. Second method will be best.
      – Debian_yadav
      May 18 at 7:51










    • It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
      – karel
      May 18 at 7:53













    up vote
    5
    down vote










    up vote
    5
    down vote









    youtube-dl can be installed from the default repositories in all currently supported versions of Ubuntu with this command:



    sudo apt install youtube-dl 


    youtube-dl that is installed by this command should work fine without needing to be updated, except by the usual default software updates.



    youtube-dl's self-update mechanism is disabled on Debian-based operating systems. You can update to the latest version of youtube-dl either with pip or by installing the youtube-dl snap package.



    sudo apt remove youtube-dl
    sudo apt install python3-pip
    sudo pip3 install youtube-dl


    or



    sudo snap install youtube-dl-casept





    share|improve this answer














    youtube-dl can be installed from the default repositories in all currently supported versions of Ubuntu with this command:



    sudo apt install youtube-dl 


    youtube-dl that is installed by this command should work fine without needing to be updated, except by the usual default software updates.



    youtube-dl's self-update mechanism is disabled on Debian-based operating systems. You can update to the latest version of youtube-dl either with pip or by installing the youtube-dl snap package.



    sudo apt remove youtube-dl
    sudo apt install python3-pip
    sudo pip3 install youtube-dl


    or



    sudo snap install youtube-dl-casept






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jun 18 at 5:41

























    answered May 18 at 7:27









    karel

    49.7k11105127




    49.7k11105127







    • 1




      try to avoid first method which will download older version, it has bugs. Second method will be best.
      – Debian_yadav
      May 18 at 7:51










    • It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
      – karel
      May 18 at 7:53













    • 1




      try to avoid first method which will download older version, it has bugs. Second method will be best.
      – Debian_yadav
      May 18 at 7:51










    • It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
      – karel
      May 18 at 7:53








    1




    1




    try to avoid first method which will download older version, it has bugs. Second method will be best.
    – Debian_yadav
    May 18 at 7:51




    try to avoid first method which will download older version, it has bugs. Second method will be best.
    – Debian_yadav
    May 18 at 7:51












    It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
    – karel
    May 18 at 7:53





    It's not bugs in youtube-dl, it's just that youtube-dl is out-of-date because Google frequently changes the rules for downloading YouTube videos faster than youtube-dl updates itself.
    – karel
    May 18 at 7:53













    up vote
    0
    down vote













    You should be able to run youtube-dl with your version of python by doing:



    /your/path/python3 /usr/local/bin/youtube-dl


    Find out your python3 path by doing which python3






    share|improve this answer
























      up vote
      0
      down vote













      You should be able to run youtube-dl with your version of python by doing:



      /your/path/python3 /usr/local/bin/youtube-dl


      Find out your python3 path by doing which python3






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        You should be able to run youtube-dl with your version of python by doing:



        /your/path/python3 /usr/local/bin/youtube-dl


        Find out your python3 path by doing which python3






        share|improve this answer












        You should be able to run youtube-dl with your version of python by doing:



        /your/path/python3 /usr/local/bin/youtube-dl


        Find out your python3 path by doing which python3







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 13 at 5:26









        AlexG

        1012




        1012






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037666%2fyoutube-dl-python-not-found-18-04%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491