Getting Started: 1. Set Up A Python Interpreter
Getting Started: 1. Set Up A Python Interpreter
a Python 3.5+ Interpreter together with the python packages jupyter, numpy, scipy, pandas and
matplotlib
the material of this tutorial (https://github.com/padas-pub/python-tutorials) in form of jupyter
notebook files (.ipynb)
The easiest way to set up a working python environment is by installing Anaconda - a bundle consisting of
the Python interpreter, pre-compiled packages, tools for handling virtual environments, package
management, etc.
1.1 Install Anaconda
Please follow the installation steps according to your operating system.
export PATH="~/anaconda3/bin:$PATH"
nano ~/.bashrc
Finally, close and re-open your terminal so the changes can take effect.
You can check your installation by typing conda "list command" in your terminal. If anaconda is
susccessfully installed this command will display a list of installed packages.
You can check your installation by typing conda "list command" in your Command Prompt. If anaconda is
successfully installed this command will display a list of installed packages.
For OS X users
Click and download the Anaconda installer for OS X. (https://www.anaconda.com/download/)
Download the command line installer for Anaconda with Python 3.5 or higher.
Change ~/Downloads with your actual path and Anaconda3-4.2.0-MacOSX-x86_64.sh with your actual file
name.
If your installation is successfull , the message “Installation finished.” will be displayed.
1.2 Use Anaconda
Launch Anaconda
You can run anaconda navigator via the following command line:
$ anaconda-navigator
You can run the jupyter notebook via the following command line:
Install package
To install a package, open your terminal window and type the following command to install for example the
"atlas" package:
$ anaconda-navigator
The graphic interface of anaconda navigator will appear. Go to the environments in the left side and choose
not installed and you will get this interface.
Check any package you want, hit apply which will appear in the bottom and then accept the installation of
the new package.
Update package
To update a package, open your terminal window and type the following command to update for example
the "atlas" package:
Or you can launch the Anaconda Navigator with the command line:
$ anaconda-navigator
The graphic interface of anaconda navigator will appear. Go to the environments in the left side and you will
get this interface. Click on the blue arrow corresponding to the chosen package and then hit apply which is
in the bottom and then hit ok.
1.4 Reference
http://docs.anaconda.com/anaconda/install/ (http://docs.anaconda.com/anaconda/install/)
2. Clone Repository
Install git
Use this command to download git in case you don't have it on your system
For OS X
Run the following command in the git terminal to clone the python-tutorials repository:
Run the following command in the git terminal in order to clone the python-tutorials repository:
Navigate to your local python-tutorials folder and run jupyter notebook via this command:
Then a browser window should open, showing the content of your local python-tutorials folder.
In order to execute a cell in a jupyter notebook, just hit Shift + Enter or Ctrl + Enter.