4 steps to Python¶
- Install Python using Miniconda
- Install the Jupyter Notebook
- Install core scientific packages
- Run the Jupyter Notebook
1. Install Python using Miniconda¶
Miniconda installers contains Python and the Conda package manager. Installers exist for Windows, Mac, and Linux. Download the installer that matches your operating system and follow the directions to install miniconda on your computer. Except in very special circumstances, we recommend installing Python 3. (Why?)
Once installed, Miniconda becomes a folder that contains everything Python and Conda related. If anything ever goes wrong with your Python setup, you can always remove the Miniconda folder and start over.
Conda will be your main tool for installing Python packages moving forward. It installs packages through a mechanism known as conda-recipes. (It’s important to note, it can do `many other`_ things as well.) Conda also manages package updates and creates virtual environments.
pip is another tool for installing Python packages (and comes with Miniconda). If a conda-recipe does not exist for a package, you can try installing using pip.
2. Install the Jupyter Notebook.¶
To install new Python packages using Conda, you’ll need to use a command line.
On Windows, use the new Anaconda prompt application installed by Miniconda.
On Mac and Linux, use the Terminal application.
In general, you’ll type
conda install some_package_name to install new packages. If conda cannot find the package, try using pip.
# Installing with conda > conda install some_package_name # Installing with pip > pip install some_package_name
3. Install core scientific packages¶
Before you run Jupyter, you’ll want to install some core scientific packages. These packages allow you to produce awesome notebooks like the one shown to the right.
- Matplotlib is Python’s most popular plotting package.
- Numpy and SciPy are Python’s fundamental packages for scientific computing.
> conda install numpy scipy matplotlib
A more comprehensive list of Python packages for scientific computing can be found here.