Skip to content

Set up Python 2.7.x

Harry Wang edited this page Nov 3, 2017 · 1 revision

Setup python and pip

Mac: python 2.7.10 comes with Mac Sierra: try $ python

Windows: download and install from https://www.python.org/downloads/windows/, make sure to include the following option during the installation:

screenshot 2017-11-02 11 40 49

Mac: install pip: $ sudo easy_install pip

Windows: pip should already be installed above

Setup virtual environment

it's a good idea to create isolated Python environments using virtualenv (https://virtualenv.pypa.io/en/stable/)

Mac:

$ sudo pip install virtualenv

To create a virtual environment:

  • go to the folder of the project, such as /datamining
  • generate a venv folder for the virtual environment: $ virtualenv venv
  • activate the environment:$ source venv/bin/activate
  • install packages only in the newly created environment (if a requirement file is used): $ pip install -r requirements.txt
  • quit virtual environment: $ deactivate

Windows:

$ pip install virtualenv

To create a virtual environment:

  • go to the folder of the project, such as /datamining
  • generate a venv folder for the virtual environment: $ virtualenv venv
  • activate the environment:> venv\Scripts\activate
  • install packages only in the newly created environment (if a requirement file is used): $ pip install -r requirements.txt
  • quit virtual environment: $ deactivate

Setup Atom

https://atom.io

Clone this wiki locally