Friday, December 25, 2015

Install Python 3 and use VirtualEnv (OS X)

  1. Install xcode: $ xcode-select --install
  2. Install homebrew: $ ruby -e "$(curl -fsSL"
  3. Create .bash_profile: $ touch ~/.bash_profile
  4. Put this line inside .bash_profile: export PATH=/usr/local/bin:$PATH
  5. Install python3: $ brew install python3
  6. Create virtual environment. To make it easily found, create it under home: $ cd ~ && pyvenv arwan
  7. Activate the virtual environment created: $ source arwan/bin/activate
  8. Now you can start working in the new virtual environment. Note that it is worth to look at requirements.txt to see required packages on certain projects.

No comments: