Jun 20, 2020 – NumPy 1.19.0 is now available. This is the first release without Python 2 support, hence it was a “clean-up release”. The minimum supported Python version is now Python 3.6. An important new feature is that the random number generation infrastructure that was introduced in NumPy 1.17.0 is now accessible from Cython. Conda list grep numpy numpy 1.18.1 py37h7241aed0 numpy-base 1.18.1 py1 numpydoc 0.9.2 py0 Conclusion All of the above methods are useful to check the Numpy version on Mac, Linux, and Windows.
Posted on February 25, 2017 by Paul
Updated 26 January 2020
This is a short tutorial about installing Python 3 with NumPy, SciPy and Matplotlib on Windows.
There is also a video version of this tutorial:
We’ll start by installing the latest stable version of Python 3, which at the time of this writing is 3.8. Head over to https://www.python.org/downloads/ and download the installer. The default Python Windows installer is 32 bits and this is what I will use in this article. If you need the 64 bits version of Python, check the Looking for a specific release? section from the above page.
Start the installer and select Customize installation. On the next screen leave all the optional features checked. Finally, on the Advanced Options screen make sure to check Install for all users, Add Python to environment variables and Precompile standard library. Optionally, you can customize the install location. I’ve used C:Python38. You should see something like this:
Press the Install button and in a few minutes, depending on the speed of your computer, you should be ready. On the last page of the installer, you should also press the Disable path length limit:
Now, to check if Python was correctly installed, open a Command Prompt (or a PowerShell) window. Press and hold the SHIFT key and right click with your mouse somewhere on your desktop, select Open command window here. Alternatively, on Windows 10, use the bottom left search box to search for cmd.
Write python in the command window and press Enter, you should see something like this:
Exit from the Python interpreter by writing quit() and pressing the Enter key.
Now, open a cmd window like before. Use the next set of commands to install NumPy, SciPy and Matplotlib:
After each of the above commands you should see Successfully installed ….
Launch Python from a cmd window and check the version of Scipy, you should see something like this:
Let’s try something a bit more interesting now, let’s plot a simple function with Matplotlib. First, we’ll import SciPy and Matplotlib with:
Next, we can define some points on the (0, 1) interval with:
Now, let’s plot a parabola defined by the above interval:
You should see something like this:
If you want to learn more about Python and Matplotlib, I recommend reading Python Crash Course by Eric Matthes. The book is intended for beginners, but has a nice Data Visualization intro to Matplotlib chapter:
Another good Python book, for more advanced users, which also uses Matplotlib for some of the book projects is Python Playground by Mahesh Venkitachalam:
Check out the steps below to install Python 3 on Mac OSX.
How to download Python3
You can download Python 3 by downloading from official Python website or using Homebrew package manager for macOS .
Python Official Site
Python Numpy Download Windows 10
1) Open up Python official download site. It looks something like the image below. Press
Download Python 3.7.4
or the version you would like to download.2) After downloading the installer, open it to install Python 3.
Python 3.7.4 installer
Read Me
contains the following note about Python 3 and Python 2 Co-existence. Thus, to run Python 3, you can run Python3
or Python3.X.X
(a specific version that you installed on your machine). To run Python 2, you can run Python
or Python2.7
.Install Numpy Windows Python 3.6
3) Remove Python installer when you are done installing
4) Run
python3 --version
to check if Python 3 is installed.If you install Python 3.7.X, you can also check its version using this command:
Homebrew
Another way to install Python 3 on Mac OS is using Homebrew package manager.
1) If you don’t have Homebrew install, you can install Homebrew by following the steps on Homebrew site. You can also use the following command to install Homebrew by copy and pasting it onto your terminal.
2) To install the latest version of Python 3, run the command below.
If you already have the latest Python installed, you will see something like the message below.
3) Run
python3 --version
to check if Python 3 is installed.If you install Python 3.7.X, you can also check its version using this command:
Python 3 Shell
To open Python 3 shell from terminal, you can run
Python 3
.To close Python shell, you can type in
Note that
exit()
. The hotkeys to close it is to press Ctrl
and D
simultaneously. Note that
Command
and D
splits your Python shell view.Note that you can still access Python 2 by running
python
command.![How How](/uploads/1/1/7/8/117802801/902491683.png)
Python 3 Package Manager Pip3
![How To Numpy For Python 3.6 Mac How To Numpy For Python 3.6 Mac](/uploads/1/1/7/8/117802801/583553279.jpg)
Python 3 comes with its own package manager
pip3
. You can check out Python Package Index to look for packages that you need.To install a package using pip, you can run
pip3 install package_name
.Switch between Python 3 Versions
Python Official Site
The easier way is to download multiple versions from Python official website and run Python command with a version appeneded such as
python3.7
and python3.6
.Homebrew
If you have previous versions of Python installed, you can run the following commands to check what versions you have and switch the version you need.
Numpy Package In Python
Support Jun
Thank you for reading!
If you are preparing for Software Engineer interviews, I suggest Elements of Programming Interviews in Java for algorithm practice. Good luck!
You can also support me by following me on Medium or Twitter.
Feel free to contact me if you have any questions.