[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Current working version of Python and pygame



REMOVE ME FROM LIST



From: owner-pygame-users@xxxxxxxx <owner-pygame-users@xxxxxxxx> on behalf of claudio canepa <ccanepacc@xxxxxxxxx>
Sent: Friday, October 23, 2020 7:44 PM
To: pygame-users@xxxxxxxx <pygame-users@xxxxxxxx>
Subject: Re: [pygame] Current working version of Python and pygame
 
>  Question 1:  If someone already has installed Python but did not check this box on, is there some simple command line magic to do whatever this checkbox does?  If so, what do I need to tell my student to do?

With a python 3.X  installed  they need replace 'python' by 'py -3.X' in the cmdline.
Examples, for a python 3.7 installation:
To invoke the interactive interpreter:
   py -3.7 
To run a script:
  py -3.7 myscript.py

Another difference with unix-like OSes is that the python's Scripts directory is not on the path, so pip (and other commands in Scripts) need a full qualified path in the command, like
  c:\python37\Scripts\pip install ...
or the alternative form
  py -3.7 -m pip install .. 

I don't know if it would be better to work from a venv:

Create venv
    py -3.7 -m venv venv_path
Activate
    venv_path\Scripts\activate

After that, in that console 'python' would be the python in the venv, and venv_path\Scripts will be in the PATH, so commands like 'pip', 'pytest', etc would work fine.

To deactivate the venv:
   deactivate

> Question 2:  If someone does not have Python installed yet (or wants to install a newer version), what is the most recent version of Python (Mac and Windows) that I should ask them to install today?  I understand that there is a big effort to get the 2.0 version of Pygame out, but I want my students to use version 1.9 for now.  If they install the current version of Python: 3.9, will they be able to use pip to install a working version of pygame 1.9?  (Last time I checked, this did not work correctly?

python 3.8 has been tested more time; also 3.9 is not compatible with windows7, which maybe some students have in their house.


On Fri, Oct 23, 2020 at 7:08 PM Irv Kalb <Irv@xxxxxxxxxxxxxx> wrote:
I am teaching a Python class, where I use pygame to demonstrate OOP concepts.  I need to have my students get the proper environment to run Python with pygame.

I use a Mac, and I have Python 3.7.3, and pygame 1.9.6 installed.  Everything works fine for me.  But I have students who either have Python already installed and need to install pygame, or who need to install both Python and pygame. 

I am not a Windows user, and I typically don't use the command line for anything other than installations.  My understanding is that if you are on Windows, and you want to use pygame, then during the installation of Python, when the installation puts up dialog box about installing Python, you must check the checkbox at the bottom that says:

     Add Python 3.x to PATH

Question 1:  If someone already has installed Python but did not check this box on, is there some simple command line magic to do whatever this checkbox does?  If so, what do I need to tell my student to do?

Question 2:  If someone does not have Python installed yet (or wants to install a newer version), what is the most recent version of Python (Mac and Windows) that I should ask them to install today?  I understand that there is a big effort to get the 2.0 version of Pygame out, but I want my students to use version 1.9 for now.  If they install the current version of Python: 3.9, will they be able to use pip to install a working version of pygame 1.9?  (Last time I checked, this did not work correctly?

Thanks in advance,

Irv