/usr/bin/env: ‘python’: No such file or directory





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







5















I am trying to install Gitlab Development Kit on Windows Ubuntu Bash.



$python3 output



Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


$python output



The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>


When I try to do this:



sudo apt-get install build-essential 
./configure
make -j4 # adjust according to your available CPU capacity
sudo make install


This is the output after ./configure



$ ./configure
/usr/bin/env: ‘python’: No such file or directory




$ python --version 

The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>

$which -a python


no output



How can I solve this? I am new to Ubuntu.










share|improve this question




















  • 2





    Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

    – terdon
    Aug 4 '17 at 8:39








  • 1





    That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

    – terdon
    Aug 4 '17 at 9:03











  • My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

    – artidokuz
    Aug 4 '17 at 9:07













  • Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

    – terdon
    Aug 4 '17 at 9:10











  • I edited the question

    – artidokuz
    Aug 4 '17 at 9:20


















5















I am trying to install Gitlab Development Kit on Windows Ubuntu Bash.



$python3 output



Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


$python output



The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>


When I try to do this:



sudo apt-get install build-essential 
./configure
make -j4 # adjust according to your available CPU capacity
sudo make install


This is the output after ./configure



$ ./configure
/usr/bin/env: ‘python’: No such file or directory




$ python --version 

The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>

$which -a python


no output



How can I solve this? I am new to Ubuntu.










share|improve this question




















  • 2





    Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

    – terdon
    Aug 4 '17 at 8:39








  • 1





    That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

    – terdon
    Aug 4 '17 at 9:03











  • My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

    – artidokuz
    Aug 4 '17 at 9:07













  • Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

    – terdon
    Aug 4 '17 at 9:10











  • I edited the question

    – artidokuz
    Aug 4 '17 at 9:20














5












5








5


2






I am trying to install Gitlab Development Kit on Windows Ubuntu Bash.



$python3 output



Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


$python output



The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>


When I try to do this:



sudo apt-get install build-essential 
./configure
make -j4 # adjust according to your available CPU capacity
sudo make install


This is the output after ./configure



$ ./configure
/usr/bin/env: ‘python’: No such file or directory




$ python --version 

The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>

$which -a python


no output



How can I solve this? I am new to Ubuntu.










share|improve this question
















I am trying to install Gitlab Development Kit on Windows Ubuntu Bash.



$python3 output



Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>


$python output



The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>


When I try to do this:



sudo apt-get install build-essential 
./configure
make -j4 # adjust according to your available CPU capacity
sudo make install


This is the output after ./configure



$ ./configure
/usr/bin/env: ‘python’: No such file or directory




$ python --version 

The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>

$which -a python


no output



How can I solve this? I am new to Ubuntu.







python windows-subsystem-for-linux gitlab






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 '18 at 21:31









TRiG

1,46411432




1,46411432










asked Aug 4 '17 at 8:29









artidokuzartidokuz

30116




30116








  • 2





    Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

    – terdon
    Aug 4 '17 at 8:39








  • 1





    That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

    – terdon
    Aug 4 '17 at 9:03











  • My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

    – artidokuz
    Aug 4 '17 at 9:07













  • Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

    – terdon
    Aug 4 '17 at 9:10











  • I edited the question

    – artidokuz
    Aug 4 '17 at 9:20














  • 2





    Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

    – terdon
    Aug 4 '17 at 8:39








  • 1





    That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

    – terdon
    Aug 4 '17 at 9:03











  • My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

    – artidokuz
    Aug 4 '17 at 9:07













  • Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

    – terdon
    Aug 4 '17 at 9:10











  • I edited the question

    – artidokuz
    Aug 4 '17 at 9:20








2




2





Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

– terdon
Aug 4 '17 at 8:39







Please edit your question and show us the output of these commands: i) python --version; ii) which -a python.

– terdon
Aug 4 '17 at 8:39






1




1





That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

– terdon
Aug 4 '17 at 9:03





That doesn't make sense. You said " it starts python as it should", but your output shows you don't have python installed. Did you actually run python2 or something?

– terdon
Aug 4 '17 at 9:03













My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

– artidokuz
Aug 4 '17 at 9:07







My bad i used $ alias python=python3 before writing python that time after reopening its gone altought it didn't solved the problem

– artidokuz
Aug 4 '17 at 9:07















Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

– terdon
Aug 4 '17 at 9:10





Please edit your question and clarify. Do you or do you not have python installed? What happens if you run python from the command line? Do you mean you only have python3 installed?

– terdon
Aug 4 '17 at 9:10













I edited the question

– artidokuz
Aug 4 '17 at 9:20





I edited the question

– artidokuz
Aug 4 '17 at 9:20










4 Answers
4






active

oldest

votes


















4














You do seem to have python3 installed, but it isn't called python and anyway the script you want to run (configure) requires python 2. So:





  1. Install python2



    sudo apt-get install python2.7-minimal



  2. Run it again



    ./configure



If that fails again, call it with python2 explicitly:



/usr/bin/python2.7 configure





share|improve this answer

































    2














    I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.



    I tried:



    sudo apt-get install python2.7-minimal


    but I still got the same error. I solved it by:



    sudo apt install python-minimal





    share|improve this answer


























    • This is really correct: after which python --version gives python 2.7.14

      – Mohammad Kanan
      Sep 4 '18 at 7:25













    • This one solved my problem but accepted answer didn't..curious..

      – Diego
      2 days ago



















    1














    I had the same problem, It got solved by linking python to python2.7 with the following commands



    cd /usr/bin
    sudo mv python python.bak
    sudo ln -s /usr/bin/python2.7 /usr/bin/python





    share|improve this answer


























    • Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

      – Amit
      Feb 9 at 2:56



















    0














    Just for reference... I had a similar issue - running a python script from the docker container failed with "No such file or directory", my solution was to force Unix style line endings on the checkout of the code and in the IDE (as it was bind-mounted from the Windows host to the container).






    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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      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%2f942930%2fusr-bin-env-python-no-such-file-or-directory%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      You do seem to have python3 installed, but it isn't called python and anyway the script you want to run (configure) requires python 2. So:





      1. Install python2



        sudo apt-get install python2.7-minimal



      2. Run it again



        ./configure



      If that fails again, call it with python2 explicitly:



      /usr/bin/python2.7 configure





      share|improve this answer






























        4














        You do seem to have python3 installed, but it isn't called python and anyway the script you want to run (configure) requires python 2. So:





        1. Install python2



          sudo apt-get install python2.7-minimal



        2. Run it again



          ./configure



        If that fails again, call it with python2 explicitly:



        /usr/bin/python2.7 configure





        share|improve this answer




























          4












          4








          4







          You do seem to have python3 installed, but it isn't called python and anyway the script you want to run (configure) requires python 2. So:





          1. Install python2



            sudo apt-get install python2.7-minimal



          2. Run it again



            ./configure



          If that fails again, call it with python2 explicitly:



          /usr/bin/python2.7 configure





          share|improve this answer















          You do seem to have python3 installed, but it isn't called python and anyway the script you want to run (configure) requires python 2. So:





          1. Install python2



            sudo apt-get install python2.7-minimal



          2. Run it again



            ./configure



          If that fails again, call it with python2 explicitly:



          /usr/bin/python2.7 configure






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 11 '17 at 15:46









          Wassim Dhif

          1386




          1386










          answered Aug 4 '17 at 9:27









          terdonterdon

          67.5k13139223




          67.5k13139223

























              2














              I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.



              I tried:



              sudo apt-get install python2.7-minimal


              but I still got the same error. I solved it by:



              sudo apt install python-minimal





              share|improve this answer


























              • This is really correct: after which python --version gives python 2.7.14

                – Mohammad Kanan
                Sep 4 '18 at 7:25













              • This one solved my problem but accepted answer didn't..curious..

                – Diego
                2 days ago
















              2














              I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.



              I tried:



              sudo apt-get install python2.7-minimal


              but I still got the same error. I solved it by:



              sudo apt install python-minimal





              share|improve this answer


























              • This is really correct: after which python --version gives python 2.7.14

                – Mohammad Kanan
                Sep 4 '18 at 7:25













              • This one solved my problem but accepted answer didn't..curious..

                – Diego
                2 days ago














              2












              2








              2







              I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.



              I tried:



              sudo apt-get install python2.7-minimal


              but I still got the same error. I solved it by:



              sudo apt install python-minimal





              share|improve this answer















              I had the same problem after installing Ubuntu 18.04 and trying to run some python scripts.



              I tried:



              sudo apt-get install python2.7-minimal


              but I still got the same error. I solved it by:



              sudo apt install python-minimal






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 24 '18 at 5:12









              Stephen Rauch

              1,1546716




              1,1546716










              answered Aug 24 '18 at 4:15









              WaweruWaweru

              214




              214













              • This is really correct: after which python --version gives python 2.7.14

                – Mohammad Kanan
                Sep 4 '18 at 7:25













              • This one solved my problem but accepted answer didn't..curious..

                – Diego
                2 days ago



















              • This is really correct: after which python --version gives python 2.7.14

                – Mohammad Kanan
                Sep 4 '18 at 7:25













              • This one solved my problem but accepted answer didn't..curious..

                – Diego
                2 days ago

















              This is really correct: after which python --version gives python 2.7.14

              – Mohammad Kanan
              Sep 4 '18 at 7:25







              This is really correct: after which python --version gives python 2.7.14

              – Mohammad Kanan
              Sep 4 '18 at 7:25















              This one solved my problem but accepted answer didn't..curious..

              – Diego
              2 days ago





              This one solved my problem but accepted answer didn't..curious..

              – Diego
              2 days ago











              1














              I had the same problem, It got solved by linking python to python2.7 with the following commands



              cd /usr/bin
              sudo mv python python.bak
              sudo ln -s /usr/bin/python2.7 /usr/bin/python





              share|improve this answer


























              • Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

                – Amit
                Feb 9 at 2:56
















              1














              I had the same problem, It got solved by linking python to python2.7 with the following commands



              cd /usr/bin
              sudo mv python python.bak
              sudo ln -s /usr/bin/python2.7 /usr/bin/python





              share|improve this answer


























              • Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

                – Amit
                Feb 9 at 2:56














              1












              1








              1







              I had the same problem, It got solved by linking python to python2.7 with the following commands



              cd /usr/bin
              sudo mv python python.bak
              sudo ln -s /usr/bin/python2.7 /usr/bin/python





              share|improve this answer















              I had the same problem, It got solved by linking python to python2.7 with the following commands



              cd /usr/bin
              sudo mv python python.bak
              sudo ln -s /usr/bin/python2.7 /usr/bin/python






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 9 '18 at 17:19









              Félicien

              8481516




              8481516










              answered Apr 9 '18 at 15:15









              Ranjan RaveeRanjan Ravee

              111




              111













              • Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

                – Amit
                Feb 9 at 2:56



















              • Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

                – Amit
                Feb 9 at 2:56

















              Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

              – Amit
              Feb 9 at 2:56





              Worked for python3 as well, while trying to install youtube-dl. I did not want to install another version ... Simple way to just link instead

              – Amit
              Feb 9 at 2:56











              0














              Just for reference... I had a similar issue - running a python script from the docker container failed with "No such file or directory", my solution was to force Unix style line endings on the checkout of the code and in the IDE (as it was bind-mounted from the Windows host to the container).






              share|improve this answer




























                0














                Just for reference... I had a similar issue - running a python script from the docker container failed with "No such file or directory", my solution was to force Unix style line endings on the checkout of the code and in the IDE (as it was bind-mounted from the Windows host to the container).






                share|improve this answer


























                  0












                  0








                  0







                  Just for reference... I had a similar issue - running a python script from the docker container failed with "No such file or directory", my solution was to force Unix style line endings on the checkout of the code and in the IDE (as it was bind-mounted from the Windows host to the container).






                  share|improve this answer













                  Just for reference... I had a similar issue - running a python script from the docker container failed with "No such file or directory", my solution was to force Unix style line endings on the checkout of the code and in the IDE (as it was bind-mounted from the Windows host to the container).







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 9 at 18:49









                  RotsRots

                  101




                  101






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f942930%2fusr-bin-env-python-no-such-file-or-directory%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Human spaceflight

                      Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                      File:DeusFollowingSea.jpg