1

Trying to use Python to code games. First installed python version 3.7. The software was downloaded in users/admin/program files. Here I would like to clarify that this is on my personal PC where I have no installation restriction. Python 3.7 was installed without any problem.

Subsequently tried installing Pygame and Pygame Zero. Tried running python -m pip install -U pip and pip install pygame. It was not successful and gave the above error. After referring to some help on google and possible solution, used the option "--user". It worked but don’t know what it did.

Subsequently, tested Pygame zero by typing pgzrun user/document/name.py. it is not getting executed. Below is the typed version on command prompt “ QUOTE” C:\Users\admin>pip --version pip 18.0 from C:\Users\admin\AppData\Roaming\Python\Python37\site-packages\pip (python 3.7) Following message appears when tried pgzrun C:\Users\admin>pgzrun C:\Users\admin\Documents\Python-games\Hello\Hello.py 'pgzrun' is not recognized as an internal or external command,operable program or batch file. “ UNQUOTE”

Trust this helps in identifying the issue. Not sure, if the name of the location users/admin creating confusion as I have not defined any username other than the default.

regards,

While installing pip on windows PC, I am encountering this error

C:\Users\admin>python -m pip install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\python37\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

I am not aware how the system permissions could be checked to ensure that the pip is installed correctly.

As of now, I tried using ""--user" option. It worked. But this does not seem to be the correct method. When I run pgzrun option on the command editor and call a python file (Hello.py), pgzrun does not get recognised.

  • 1
    Do you have installation permissions on the computer you are using? – Haukland Aug 22 '18 at 12:50
  • what is `pgzrun`? please describe your issue in more detail (and probably remove the answer you linked to and post that here). – hiro protagonist Aug 22 '18 at 12:51
  • [This](https://stackoverflow.com/questions/7465445/how-to-install-python-modules-without-root-access) might help. – Haukland Aug 22 '18 at 12:52
  • Pulled in the content from that link, and reworded the question accordingly. – GhostCat Aug 22 '18 at 14:32
  • @owninggreendragsdude It is installed on my pC and no restriction of downloading – RAMAN GUPTA Aug 23 '18 at 14:43
  • Did you open the Windows Command prompt as Administrator? Start->cmd (right-click - run as Administrator). I know sometimes Windows 10 can be very picky about installing / modifying items in a non-elevated prompt. – ode2k Aug 23 '18 at 15:14

0 Answers0