Python Forum
beginner needs PyGame advice
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
beginner needs PyGame advice
#5
(Dec-03-2021, 10:39 PM)barryjo Wrote: Amazing I had to use the --user option to ge3t the intall to work.

I still do not know where PyGame was installed.

I would like to know what my default program directory is and how to change it.
Should I just take the defaults.
On windows if using --user it will be in eg for 3.9.
C:\users\<username>\appdata\roaming\python\python39\
Can look at this Python 3.9/3.8 and pip installation under Windows
So there you see i like simpler path like eg C:\python39
Quote:Put another way, where is the python program located., Where did he module get loaded, should I have a sepatate direcctory just for my python files?
So you see path over,OS find Python trough Environment Variables Path,when it correct python and pip command should work from anywhere in cmd.
Quote: i.e am I going to have to do something like include c:/pythosfiles/includes/ pygame or something like this?
You don't need to include pygame once it's install pip it will always works as long Windows find python as mention over.
A simple test from cmd
Microsoft Windows [Version 10.0.19043.1288]
(c) Microsoft Corporation. Med enerett.

C:\Windows\System32>cd ..

C:\Windows>cd..

# Python version
C:\>python -V
Python 3.9.5

# Pip version
C:\>pip -V
pip 21.1.3 from c:\python39\lib\site-packages\pip (python 3.9)

# Python location
C:\>python -c "import sys;print(sys.executable)"
C:\Python39\python.exe
So you can just have python files(.py ) in c:/pythosfiles/.
Then can just python my_game.py to eg run a Pygame.
Using Editors(eg VS Code, PyCharm) then may find Python automatically or you need to point to path where Python is installed.
metulburr likes this post
Reply


Messages In This Thread
beginner needs PyGame advice - by barryjo - Dec-03-2021, 09:25 PM
RE: beginner needs PyGame advice - by metulburr - Dec-03-2021, 10:12 PM
RE: beginner needs PyGame advice - by barryjo - Dec-03-2021, 10:39 PM
RE: beginner needs PyGame advice - by metulburr - Dec-04-2021, 01:51 AM
RE: beginner needs PyGame advice - by snippsat - Dec-04-2021, 11:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to create .exe with PyGame [BEGINNER] PolarBear123 1 2,367 Mar-13-2020, 02:54 AM
Last Post: snippsat
  Beginner needing advice with data files JFI2019 2 2,232 Nov-06-2019, 04:56 PM
Last Post: JFI2019
  Pygame*import pygame ImportError: No module named pygame CASPERHANISCH 1 9,771 Jun-05-2017, 09:50 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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