Python Forum
New to Python-Unable to run a .py file in terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to Python-Unable to run a .py file in terminal
#1
Hi All
I have just started learning python and working on my MacBook Air using Terminal
I have saved a simple script with just one print command and named it ex1.py.
BTW I am using Python3.6.4
So I go to terminal and type Python3.6
It loads the python
I type Python3.6 ex1.py and press Enter and it gives me syntax error and points it to 6 in Python3.6
If I type Python3 ex1.py then it gives me same error but now points to 1 in ex1.py
Can anyone help
Reply


Messages In This Thread
New to Python-Unable to run a .py file in terminal - by AshishSangwan - Feb-15-2018, 01:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  invoking python in Terminal Euler 2 654 Aug-25-2023, 06:17 AM
Last Post: perfringo
  Launch Python IDLE Shell from terminal Pavel_47 5 1,290 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,129 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Unable to upload file using FTP korenron 2 2,522 Dec-23-2021, 12:44 PM
Last Post: korenron
  Dynamic Printing With Python Terminal MrTim 2 2,955 Jul-06-2021, 04:00 PM
Last Post: MrTim
  Running latest Python version on the Terminal (MAC) Damian 4 2,673 Mar-22-2021, 07:58 AM
Last Post: Damian
  keyboard module doesn't work in the microsoft version terminal of python. username 1 2,845 Feb-25-2021, 05:19 PM
Last Post: Larz60+
  gnome terminal playing with python jmex 12 6,241 Feb-03-2021, 01:38 PM
Last Post: Axel_Erfurt
  Refresh data in python script while running in Terminal frankenchrist 4 7,373 Feb-03-2021, 09:54 AM
Last Post: Larz60+
  Unable to capture all images of a multipage TIFF file in a merge bendersbender 0 2,238 Nov-19-2020, 03:09 PM
Last Post: bendersbender

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020