May-17-2018, 01:14 PM
Hello everyone,
I'm completely new to the Python language or to coding whatsoever. I'm following a guide done by Rob Miles called "Begin to code with Python", at the moment I'm learning how to install and add Pygame library using python shell. I use Windows 10 for this.
I started by opening Windows PowerShell and typing "py -m pip install pygame --user", there were no problems with that, it even gave me the option to update to the last version and I did so.
Apparently after that I should be able to write "import snaps import * " in Python IDLE to import all the functions in the snaps library, but there is where I get the error, a window pops up saying "invalid syntax" and the secont "import" is highlighted in red. If i only try to import snaps I get this error "ModuleNotFoundError: No module named 'snaps'".
It does says that if I want to use snaps in other folders, simply copy the file snaps.py into the folder, funny enough that file does not exist anywhere in my computer.
I know that pygame is installed and working because if I run "py -m pygame.examples.aliens" in the windows PowerShell, I'm able to play the aliens game.
I've tried to google in diferent ways but I didn't find anyone with my same problem, and I'm not able to figure it out as I don't fully understand how this programs work.
Sorry for the massive text. Thanks in advance!
I'm completely new to the Python language or to coding whatsoever. I'm following a guide done by Rob Miles called "Begin to code with Python", at the moment I'm learning how to install and add Pygame library using python shell. I use Windows 10 for this.
I started by opening Windows PowerShell and typing "py -m pip install pygame --user", there were no problems with that, it even gave me the option to update to the last version and I did so.
Apparently after that I should be able to write "import snaps import * " in Python IDLE to import all the functions in the snaps library, but there is where I get the error, a window pops up saying "invalid syntax" and the secont "import" is highlighted in red. If i only try to import snaps I get this error "ModuleNotFoundError: No module named 'snaps'".
It does says that if I want to use snaps in other folders, simply copy the file snaps.py into the folder, funny enough that file does not exist anywhere in my computer.
I know that pygame is installed and working because if I run "py -m pygame.examples.aliens" in the windows PowerShell, I'm able to play the aliens game.
I've tried to google in diferent ways but I didn't find anyone with my same problem, and I'm not able to figure it out as I don't fully understand how this programs work.
Sorry for the massive text. Thanks in advance!