Python Forum

Full Version: Can't find ex1.py... (I am very new)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all, I extremely new at this and have started trying to learn python via the hard way book. Though I am being tripped at the first hurdles. First I was having trouble using:

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27", "User")

Could only get it working by removing "User", and for some reason when I restart the PC I have to that line of code again or it can't find it.

The second issue is getting Powershell to open ex1.py (which I have saved in my desktop), I always get this error:

C:\Python27\python.exe: can't open file 'ex1.py': [Errno 2] No such file or directory

Any help would be greatly appreciated.
In the book that you are using, the author tries to convince that there is no use for python 3.
That's just plain dumb, don't believe it. Python 3 offers so much more than 2.7,

try this in 2.7
print(f'Today, {day_of_week} is a {weather_condition} day and I feel {mood}.')
I am mainly using Python 2.7 due to my interest in font development which still seems to rely on this version.
Check out the solution I gave in the other thread: https://python-forum.io/Thread-Python-Au...-variables

Your book is not the most recommended, you may run into other issues soon. Check out our tutorials section, if you like, and have fun with python! :)