1. Download and install anaconda (https://docs.anaconda.com/anaconda/install/index.html)
Instead of installing Python by itself, we are going to install Anaconda Navigator. Anaconda Navigator is a desktop graphical user interface (GUI) that allows users to launch applications and manage packages, environments and channels without using tons of command-line commands. Also, Anaconda Navigator comes with commonly used packages including SciPy, NumPy, Pandas, and Matplotlib, etc.
Go to page Anaconda distribution: https://www.anaconda.com/distribution/
Choose your operation platform and download Python 3
Make sure the directory here does not contain space
By default, Anaconda comes with the -base
environment with hundreds of pre-installed packages.
An IDE (Integrated Development Environment) is a software suite that consolidates basic tools required to write and test programs. As the name implies, IDEs usually integrate several tools including:
- An editor designed to handle code (with, for example, syntax highlighting and auto-completion)
- Code execution, and debugging tools
- Console for displaying numerical results and figures
- more
Lauch Anaconda you will see multiple IDEs. There are more general or specific IDEs, for different languages. For this training, we will be focusing on two IDEs:
a. Jupyter Notebooks
The Jupyter Notebook is an IDE that allows you to create and share documents that contain live code (similar to Matlab live script). We are going to develop our initial data analysis and regulotory tasks in Jupyter Notebooks. It is designed for checking results and visualizing data while executing code section by section. It is also great for document your codes in rich text. For further information, refer to https://jupyterlab.readthedocs.io/en/stable/
b. Spyder Spyder is an IDE that’s optimized for data science workflows. This IDE we are going to cover in a later workshop. It is a great place to develop longer programs and modules, to review source codes in other people's packages, and to debug. For further information, refer to https://realpython.com/python-ides-code-editors-guide/
- use Anaconda GUI
Search packages and click Apply
- use
conda install
in terminal (mac) or anaconda prompt (win)
Apart from widely used packages that came with Anaconda, we often need to install other packages for specific use. Well developed packages would have prepared all different ways for installation, including anaconda install
.
- use
pip install
(not recommended)
Some other packages may only support pip install
in termimals.
pip is the standard package manager for python, it can install packages inside and outside of Anaconda. So make sure you are using the pip with anaconda. Check and find out by which -a pip
. Further info refer to https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages
Now we are going to install packages in the following list: