Skip to content

Instantly share code, notes, and snippets.

@yhilpisch
Last active November 24, 2018 11:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save yhilpisch/973d4cee0fd319defe2773b51174a455 to your computer and use it in GitHub Desktop.
Save yhilpisch/973d4cee0fd319defe2773b51174a455 to your computer and use it in GitHub Desktop.

Setting up a Python Environment

Windows

Miniconda

How to install Miniconda:

https://conda.io/docs/user-guide/install/windows.html

The installer is found under:

https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe

Python

See http://conda.io

Also see https://conda.io/docs/_downloads/conda-cheatsheet.pdf

To create an environment execute in the terminal ("command prompt"):

conda create -n base python=3.6
activate base

To install Python packages and start Jupyter execute in the terminal:

conda install ipython jupyter numpy pandas scikit-learn matplotlib pytables
pip install win-unicode-console
set PYTHONIOENCODING=UTF-8
jupyter notebook

Mac OS

System

For installing the brew package manager, follow the instructions under:

https://brew.sh/

Installing system tools in a terminal/on the shell:

brew install wget htop screen [MORE IF NEEDED]

Miniconda

To download and install it:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash miniconda.sh

Open new terminal to activate the Python installation.

Python

See http://conda.io

Also see https://conda.io/docs/_downloads/conda-cheatsheet.pdf

To create an environment execute:

conda create -n base python=3.6
source activate base

To install Python packages and start Jupyter execute in the terminal:

conda install ipython jupyter numpy pandas scikit-learn matplotlib pytables
jupyter notebook

Linux

System

Doing system updates and installing system tools in the terminal/on the shell:

apt-get update
apt-get upgrade
apt-get install wget bzip2 screen vim gcc [MORE IF NEEDED]

Miniconda

To download and install it:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh

Open a new terminal/shell instance to activate the Python installation.

Python

See http://conda.io

Aslo see https://conda.io/docs/_downloads/conda-cheatsheet.pdf

To create an environment execute:

conda create -n base python=3.6
source activate base

To install Python packages and start Jupyter execute in the terminal:

conda install ipython jupyter numpy pandas scikit-learn matplotlib pytables
jupyter notebook

The Python Quants

http://twitter.com/dyjh

team@tpq.io | http://tpq.io

http://pyalgo.tpq.io | http://certificate.tpq.io

@Anshaadi
Copy link

got it bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment