'Installing modules on IDLE

I am fairly new to Python and am trying to install matplotlib and numpy onto the IDLE from python.org. I am using a Mac, and everything online tells me to use the command line to install using something like "pip install matplotlib" but the IDLE doesn't have any command line connected to it.

I have already managed to install pip but still am unable to import the modules I need from it. How can I do this?



Solution 1:[1]

from subprocess import call
call(['pip', 'install', 'MODULE'])

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Veljko Jovanovic