How to execute python script by terminal?Why is python's “easy_install” installing into the wrong directory?Rollback Python2.7 InstallationOS X Lion mysterious user cron job just does echo “PATH is $PATH”How can I tell Firewall to allow incoming connections for Python running a specific script? (In this case: SickBeard)“Cannot execute binary file” with alias of binaryHow do I change the path that is being searched for launching an application?os 10.11.6 pip install permission errorUnable to locate an executable at “/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/apt” (-1)?

Christmas party and autism

Can I land my aircraft on the grass next to the runway at a public airport?

Now I realize I used too many GFCI outlets. How can I reclaim them?

How can I prevent renaming the arguments to Function[...,...] for making plots of spherical harmonics coloured by phase

Will you be able to hear a supersonic aircraft flying away from you?

Why is the Exchange French considered drawish?

The lecturer supposed to grade my presentation fell asleep while I held it. Should I complain?

Horizontally mirror a brainflak program

Why would a life company agree to a 20-year guaranteed life annuity which is expected to pay out more than the principal?

Origin of the Latin Language?

White marks on garage ceiling

Water Jug Problem in AI

Where do I put nobles/royalty in a scifi military

when "this" is captured by a lambda does it have to be used explicitly

What to do if caught in a physical pentest?

What makes an airport "international"?

Paint Exterior Door that is in Sun

Medium - Rare steak as meal prep ok?

Is it possible to get reverse life insurance?

Getting data from Seagate ST-238R drive

Why use Fourier series instead of Taylor?

How do I experimentally measure the surface area of a rock?

Why do Muslim refugees seek asylum in Europe and not in rich countries in the Middle East?

What are these tiny kidney bean sized things in my rotisserie chicken



How to execute python script by terminal?


Why is python's “easy_install” installing into the wrong directory?Rollback Python2.7 InstallationOS X Lion mysterious user cron job just does echo “PATH is $PATH”How can I tell Firewall to allow incoming connections for Python running a specific script? (In this case: SickBeard)“Cannot execute binary file” with alias of binaryHow do I change the path that is being searched for launching an application?os 10.11.6 pip install permission errorUnable to locate an executable at “/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/apt” (-1)?






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









1

















I wanted to learn Python, I installed some software. I created a little execution files and none of them will execute. So I've checked my terminal and type basic things like Is, cd etc. None of them work



:Users me$ cd
:~ me$ cd
:~ me$ cd /
:/ me$ Is
-bash: Is: command not found
:/ me$ cd ~
:~ me$ cd desktop
:desktop me$


If I type echo $PATH, here the result:




/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin




I read many things about how to fix it but I don't understand. For example:



  • I don't know how to find the User Folder

  • I don't know how to get to the bash.profile

Bear in mind that I am very new to this.










share|improve this question


































    1

















    I wanted to learn Python, I installed some software. I created a little execution files and none of them will execute. So I've checked my terminal and type basic things like Is, cd etc. None of them work



    :Users me$ cd
    :~ me$ cd
    :~ me$ cd /
    :/ me$ Is
    -bash: Is: command not found
    :/ me$ cd ~
    :~ me$ cd desktop
    :desktop me$


    If I type echo $PATH, here the result:




    /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin




    I read many things about how to fix it but I don't understand. For example:



    • I don't know how to find the User Folder

    • I don't know how to get to the bash.profile

    Bear in mind that I am very new to this.










    share|improve this question






























      1












      1








      1








      I wanted to learn Python, I installed some software. I created a little execution files and none of them will execute. So I've checked my terminal and type basic things like Is, cd etc. None of them work



      :Users me$ cd
      :~ me$ cd
      :~ me$ cd /
      :/ me$ Is
      -bash: Is: command not found
      :/ me$ cd ~
      :~ me$ cd desktop
      :desktop me$


      If I type echo $PATH, here the result:




      /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin




      I read many things about how to fix it but I don't understand. For example:



      • I don't know how to find the User Folder

      • I don't know how to get to the bash.profile

      Bear in mind that I am very new to this.










      share|improve this question

















      I wanted to learn Python, I installed some software. I created a little execution files and none of them will execute. So I've checked my terminal and type basic things like Is, cd etc. None of them work



      :Users me$ cd
      :~ me$ cd
      :~ me$ cd /
      :/ me$ Is
      -bash: Is: command not found
      :/ me$ cd ~
      :~ me$ cd desktop
      :desktop me$


      If I type echo $PATH, here the result:




      /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin




      I read many things about how to fix it but I don't understand. For example:



      • I don't know how to find the User Folder

      • I don't know how to get to the bash.profile

      Bear in mind that I am very new to this.







      macos terminal bash python






      share|improve this question
















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 9 at 10:55









      nohillside

      58.1k15 gold badges125 silver badges170 bronze badges




      58.1k15 gold badges125 silver badges170 bronze badges










      asked Aug 9 at 9:37









      JeremyCJeremyC

      82 bronze badges




      82 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          5


















          If you want to list all files/folders in a directory, you should type ls not Is. It is L, not i.



          To learn python, you won't need to reach ~/.bash_profile unless you need to change versions. Just use which python or python --version and use the syntax for the version that appears. Or use online compilers for quick testing.



          Suppose you have your file learn.py at Desktop, you type cd ~/Desktop, type ls to confirm, and then to run the file as a script, type python learn.py. To enter python console, type python and use it.



          Wherever your file is, you could type cd in Terminal, then drag your file into Terminal window and press Enter. Terminal will resolve the path for you.



          For further help, refer to Stack Overflow. :)



          If you want to see bash profile, open Finder, type command + shift + . to reveal hidden files and then command + shift + G and type ~/.bash_profile in "Go To". But don't edit it unless required.






          share|improve this answer























          • 1





            If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

            – Marco M. von Hagen
            Aug 9 at 20:49






          • 2





            @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

            – Glen Yates
            Aug 9 at 22:10







          • 1





            @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

            – Marco M. von Hagen
            Aug 13 at 14:11



















          2


















          if python is installed already just go to terminal, go to correct directory and type "python filename.py"






          share|improve this answer





















          • 4





            Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

            – Glorfindel
            Aug 9 at 14:08











          • In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

            – Marco M. von Hagen
            Aug 9 at 20:53






          • 1





            "if python is installed already " - When won't it be installed?

            – user151019
            Aug 13 at 20:46











          • @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

            – user151019
            Aug 13 at 20:48



















          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5


















          If you want to list all files/folders in a directory, you should type ls not Is. It is L, not i.



          To learn python, you won't need to reach ~/.bash_profile unless you need to change versions. Just use which python or python --version and use the syntax for the version that appears. Or use online compilers for quick testing.



          Suppose you have your file learn.py at Desktop, you type cd ~/Desktop, type ls to confirm, and then to run the file as a script, type python learn.py. To enter python console, type python and use it.



          Wherever your file is, you could type cd in Terminal, then drag your file into Terminal window and press Enter. Terminal will resolve the path for you.



          For further help, refer to Stack Overflow. :)



          If you want to see bash profile, open Finder, type command + shift + . to reveal hidden files and then command + shift + G and type ~/.bash_profile in "Go To". But don't edit it unless required.






          share|improve this answer























          • 1





            If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

            – Marco M. von Hagen
            Aug 9 at 20:49






          • 2





            @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

            – Glen Yates
            Aug 9 at 22:10







          • 1





            @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

            – Marco M. von Hagen
            Aug 13 at 14:11
















          5


















          If you want to list all files/folders in a directory, you should type ls not Is. It is L, not i.



          To learn python, you won't need to reach ~/.bash_profile unless you need to change versions. Just use which python or python --version and use the syntax for the version that appears. Or use online compilers for quick testing.



          Suppose you have your file learn.py at Desktop, you type cd ~/Desktop, type ls to confirm, and then to run the file as a script, type python learn.py. To enter python console, type python and use it.



          Wherever your file is, you could type cd in Terminal, then drag your file into Terminal window and press Enter. Terminal will resolve the path for you.



          For further help, refer to Stack Overflow. :)



          If you want to see bash profile, open Finder, type command + shift + . to reveal hidden files and then command + shift + G and type ~/.bash_profile in "Go To". But don't edit it unless required.






          share|improve this answer























          • 1





            If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

            – Marco M. von Hagen
            Aug 9 at 20:49






          • 2





            @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

            – Glen Yates
            Aug 9 at 22:10







          • 1





            @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

            – Marco M. von Hagen
            Aug 13 at 14:11














          5














          5










          5









          If you want to list all files/folders in a directory, you should type ls not Is. It is L, not i.



          To learn python, you won't need to reach ~/.bash_profile unless you need to change versions. Just use which python or python --version and use the syntax for the version that appears. Or use online compilers for quick testing.



          Suppose you have your file learn.py at Desktop, you type cd ~/Desktop, type ls to confirm, and then to run the file as a script, type python learn.py. To enter python console, type python and use it.



          Wherever your file is, you could type cd in Terminal, then drag your file into Terminal window and press Enter. Terminal will resolve the path for you.



          For further help, refer to Stack Overflow. :)



          If you want to see bash profile, open Finder, type command + shift + . to reveal hidden files and then command + shift + G and type ~/.bash_profile in "Go To". But don't edit it unless required.






          share|improve this answer
















          If you want to list all files/folders in a directory, you should type ls not Is. It is L, not i.



          To learn python, you won't need to reach ~/.bash_profile unless you need to change versions. Just use which python or python --version and use the syntax for the version that appears. Or use online compilers for quick testing.



          Suppose you have your file learn.py at Desktop, you type cd ~/Desktop, type ls to confirm, and then to run the file as a script, type python learn.py. To enter python console, type python and use it.



          Wherever your file is, you could type cd in Terminal, then drag your file into Terminal window and press Enter. Terminal will resolve the path for you.



          For further help, refer to Stack Overflow. :)



          If you want to see bash profile, open Finder, type command + shift + . to reveal hidden files and then command + shift + G and type ~/.bash_profile in "Go To". But don't edit it unless required.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Aug 13 at 15:46









          Marco M. von Hagen

          3612 silver badges8 bronze badges




          3612 silver badges8 bronze badges










          answered Aug 9 at 10:01









          ankiiankii

          3,5365 gold badges7 silver badges34 bronze badges




          3,5365 gold badges7 silver badges34 bronze badges










          • 1





            If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

            – Marco M. von Hagen
            Aug 9 at 20:49






          • 2





            @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

            – Glen Yates
            Aug 9 at 22:10







          • 1





            @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

            – Marco M. von Hagen
            Aug 13 at 14:11













          • 1





            If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

            – Marco M. von Hagen
            Aug 9 at 20:49






          • 2





            @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

            – Glen Yates
            Aug 9 at 22:10







          • 1





            @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

            – Marco M. von Hagen
            Aug 13 at 14:11








          1




          1





          If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

          – Marco M. von Hagen
          Aug 9 at 20:49





          If location of file is not desktop, u can type cd and then drag folder into terminal window and type ENTER. That will bring you there.

          – Marco M. von Hagen
          Aug 9 at 20:49




          2




          2





          @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

          – Glen Yates
          Aug 9 at 22:10






          @MarcoM.vonHagen Might need to point out that you shouldn't actually type ENTER, but rather press the 'Enter' key.

          – Glen Yates
          Aug 9 at 22:10





          1




          1





          @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

          – Marco M. von Hagen
          Aug 13 at 14:11






          @GlenYates You are absolut right. <kbd>Enter</kbd> will result in Enter-key . But not in comments ;-(

          – Marco M. von Hagen
          Aug 13 at 14:11














          2


















          if python is installed already just go to terminal, go to correct directory and type "python filename.py"






          share|improve this answer





















          • 4





            Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

            – Glorfindel
            Aug 9 at 14:08











          • In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

            – Marco M. von Hagen
            Aug 9 at 20:53






          • 1





            "if python is installed already " - When won't it be installed?

            – user151019
            Aug 13 at 20:46











          • @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

            – user151019
            Aug 13 at 20:48















          2


















          if python is installed already just go to terminal, go to correct directory and type "python filename.py"






          share|improve this answer





















          • 4





            Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

            – Glorfindel
            Aug 9 at 14:08











          • In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

            – Marco M. von Hagen
            Aug 9 at 20:53






          • 1





            "if python is installed already " - When won't it be installed?

            – user151019
            Aug 13 at 20:46











          • @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

            – user151019
            Aug 13 at 20:48













          2














          2










          2









          if python is installed already just go to terminal, go to correct directory and type "python filename.py"






          share|improve this answer














          if python is installed already just go to terminal, go to correct directory and type "python filename.py"







          share|improve this answer













          share|improve this answer




          share|improve this answer










          answered Aug 9 at 13:26









          utku cevvalutku cevval

          396 bronze badges




          396 bronze badges










          • 4





            Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

            – Glorfindel
            Aug 9 at 14:08











          • In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

            – Marco M. von Hagen
            Aug 9 at 20:53






          • 1





            "if python is installed already " - When won't it be installed?

            – user151019
            Aug 13 at 20:46











          • @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

            – user151019
            Aug 13 at 20:48












          • 4





            Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

            – Glorfindel
            Aug 9 at 14:08











          • In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

            – Marco M. von Hagen
            Aug 9 at 20:53






          • 1





            "if python is installed already " - When won't it be installed?

            – user151019
            Aug 13 at 20:46











          • @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

            – user151019
            Aug 13 at 20:48







          4




          4





          Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

          – Glorfindel
          Aug 9 at 14:08





          Welcome to Ask Different! Please note the author of the question is "very new" to Terminal; they probably don't know what you mean by "go to correct directory".

          – Glorfindel
          Aug 9 at 14:08













          In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

          – Marco M. von Hagen
          Aug 9 at 20:53





          In case of 'very new' I would suggest to learn bash shell before python. That knowledge will be helpful when digging into python later on.

          – Marco M. von Hagen
          Aug 9 at 20:53




          1




          1





          "if python is installed already " - When won't it be installed?

          – user151019
          Aug 13 at 20:46





          "if python is installed already " - When won't it be installed?

          – user151019
          Aug 13 at 20:46













          @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

          – user151019
          Aug 13 at 20:48





          @MarcoM.vonHagen No need for shell - you can do anything in python that shell can do - and it is a more sane syntax. Especially if you are used to GUI

          – user151019
          Aug 13 at 20:48



          Popular posts from this blog

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?