im not really sure then where macs put things. I never have used or would ever use one.
I would then use python itself to tell me where it is
1) open the interpreter you want to use python 3.7 which i am assuming on a mac would be invoking it like:
In my case i would install pygame to my python3.7 via
after installing mine, it installed pygame to this path in my home.
I would then use python itself to tell me where it is
1) open the interpreter you want to use python 3.7 which i am assuming on a mac would be invoking it like:
python3.7or maybe even
python37then run sys.path to find its location
metulburr@ubuntu:~$ python3.7 Python 3.7.3 (default, Mar 26 2019, 01:59:45) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages'] >>>That would give you the correct location of the paths for that specific python version to find the example files
In my case i would install pygame to my python3.7 via
metulburr@ubuntu:~$ python3.7 -m pip install pygame Collecting pygame Downloading https://files.pythonhosted.org/packages/18/b3/0bf5afdcf6ef95d2a343cd7865585a6efe5e3e727c1a4f3385c9935248cf/pygame-1.9.6-cp37-cp37m-manylinux1_x86_64.whl (11.4MB) 100% |████████████████████████████████| 11.4MB 153kB/s Installing collected packages: pygame Successfully installed pygameconfirmation:
metulburr@ubuntu:~$ python3.7 Python 3.7.3 (default, Mar 26 2019, 01:59:45) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pygame pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.htmlexamples execution:
metulburr@ubuntu:~$ python3.7 -m pygame.examples.aliens pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.htmlEDIT:
after installing mine, it installed pygame to this path in my home.
metulburr@ubuntu:~/.local/lib/python3.7/site-packages/pygame/examples$ ls aacircle.py fonty.py playmus.py aliens.py freetype_misc.py prevent_display_stretching.py arraydemo.py glcube.py __pycache__ audiocapture.py headless_no_windows_needed.py scaletest.py blend_fill.py __init__.py scrap_clipboard.py blit_blends.py liquid.py scroll.py camera.py macosx sound_array_demos.py chimp.py mask.py sound.py cursors.py midi.py stars.py data moveit.py testsprite.py dropevent.py oldalien.py textinput.py eventlist.py overlay.py vgrade.py fastevents.py pixelarray.py video.py
Recommended Tutorials: