Installation and unloading of Python module

Using the PIP command
If there are multiple versions of the system, use the corresponding PIP version to remove the corresponding Python version of the module
In python2.7 use pip3 above PIP python3.0
Installation module:
The python3 version USES the pip3 install module name
Such as installing python3 version of pygame

xubin@xubindeMBP:~/Python$ pip3 install pygame
Collecting pygame
  Using cached https://files.pythonhosted.org/packages/b9/89/aca02f8771727c2713c11a39c1cc295e4deb60be322be19ad7460570f978/pygame-1.9.4-cp37-cp37m-macosx_10_11_intel.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.4

Unloading module:
The python3 version USES the pip3 uninstall module name
Such as uninstalling pygame in python3

xubin@xubindeMBP:~/Python$ pip3 uninstall pygame
Uninstalling pygame-1.9.4:
  Would remove:
    /usr/local/include/python3.7m/pygame/_camera.h
    /usr/local/include/python3.7m/pygame/_pygame.h
    /usr/local/include/python3.7m/pygame/_surface.h
    /usr/local/include/python3.7m/pygame/bitmask.h
    /usr/local/include/python3.7m/pygame/camera.h
    /usr/local/include/python3.7m/pygame/fastevents.h
    /usr/local/include/python3.7m/pygame/font.h
    /usr/local/include/python3.7m/pygame/freetype.h
    /usr/local/include/python3.7m/pygame/mask.h
    /usr/local/include/python3.7m/pygame/mixer.h
    /usr/local/include/python3.7m/pygame/pgarrinter.h
    /usr/local/include/python3.7m/pygame/pgbufferproxy.h
    /usr/local/include/python3.7m/pygame/pgcompat.h
    /usr/local/include/python3.7m/pygame/pgopengl.h
    /usr/local/include/python3.7m/pygame/pygame.h
    /usr/local/include/python3.7m/pygame/scrap.h
    /usr/local/include/python3.7m/pygame/surface.h
    /usr/local/lib/python3.7/site-packages/pygame-1.9.4.dist-info/*
    /usr/local/lib/python3.7/site-packages/pygame/*
Proceed (y/n)?y
  Successfully uninstalled pygame-1.9.4

 

Read More: