Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_Main_ error
#1
Hello ,

I have written my first job in Python like very basic

#! /usr/bin/python
print "Hello World"
getting the following error
C:\Python27\python2.7.exe: can't find '__main__' module in 'C:\\Python27'
I have done setup configuration as suggested in some other internet posts

issue got resolved when I created a another file in the same project folder and tried to run it .not sure why original code was giving me the error.
Reply
#2
Any reason you chose to use python 2 over python 3.
As some one new to python you should definitely get started with python 3.
Reply
#3
Follow Python 3.6/3.7 and pip installation under Windows.
Reply


Forum Jump:

User Panel Messages

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