Install pygame in one step and the solution of ''Defaulting to user installation because normal site-packages is not writeabl''

1. Click Start and right click to run and enter cmd

 

 

2. Enter pip install pygame and press Enter

 

 At this point, the installation is successful, but there is a problem. If your python is installed on the c drive, there will be a sentence like the above, "Defaulting to user installation because normal site-packages is not writeable", the default is user installation, Because normal site-packages are not writable.     

Because the c drive directory requires administrator privileges to access, so it is not possible to install pygame to the corresponding python directory at this time.

Solution:

Right-click the start menu windows terminal (administrator)

Enter pip install pygame again and press Enter

In this way, the installation has been successful. This method does not need to uninstall the existing python, and then reinstall it to another directory.

 View pygame files in the python directory

If you want to delete the corresponding module, you only need to output pip uninstall XXX 

Guess you like

Origin blog.csdn.net/chenz71/article/details/128163852