Python Forum
_Main_ error - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: _Main_ error (/thread-18456.html)



_Main_ error - Abhishek0683 - May-18-2019

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.


RE: _Main_ error - Yoriz - May-18-2019

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.


RE: _Main_ error - snippsat - May-18-2019

Follow Python 3.6/3.7 and pip installation under Windows.