Python Forum
Can't find ex1.py... (I am very new)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't find ex1.py... (I am very new)
#1
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.
Reply
#2
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}.')
Reply
#3
I am mainly using Python 2.7 due to my interest in font development which still seems to rely on this version.
Reply
#4
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! :)
Reply


Forum Jump:

User Panel Messages

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