from matplotlib import pyplot as plt
plt.plot([1,2,3], [1,2,3])
plt.show()
matplotlib to create python plotsnumpy for scientific computingIn this course, we have used a variety of built-in modules like math, turtle, datetime.
We are not limited to these built-in modules: developers from all over the world can create new modules that serve particular needs.
In the final chapter of our course, we will make extensive use of the following external libraries, popular for scientific research:
For these modules, extra steps are needed: they are not built-in to Python, so we have to install them separately.
Ensure that the PyCharm project is using the System’s interpreter
Add a python file to write your code.
The import statement followed by the module name, allows you to import a module into your script. For example:
Note: You can use an alias to “nickname” a package and shorten your lines of code by using the
askeyword For example:Note: You can also import a function or a sub-module within a given module
If you are importing a module that wasn’t installed, it will be underlined in red:

2. Wait until a success message appears in the shell:
Successfully installed ...(a bunch of module names)

Select Project > Project interpreter from the left hand side menu
This is all the list of modules that are installed in my project, yours might not contain much for now.
To add a package/module, click the + button at the top of the list
Search for the package you want installed: “matlplotlib” then click Install Package


Now that the packages are installed, try typing those lines in your python file:
Type cmd in the Windows search bar and click the “Command Prompt” icon.
Type the following command in the command prompt:
pip install --upgrade pip
pip3 install --upgrade pip
pip3 install matplotlib
pip3 install numpy