lumeng / univ-washington-machine-learning-python-virtualenv

University of Washington Machine Learning course (https://www.coursera.org/specializations/machine-learning) Python virtual environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

University of Washington Coursera.org course Machine Learning workspace

Installation

Set up Python environment using Anaconda

Alternatively, set up Python environment using virtual environments

  • Read the basics of Python virtual environments (virtualenv) 1, 2.

  • Install Python, pip:

      brew install python 
    
  • Make sure pip is up-to-date

      pip install --upgrade pip
    
  • Install virtualenv packages using pip:

      pip install --upgrade virtualenv virtualenvwrapper
    
  • Set up virtual environment for this course 3.

      mkvirtualenv univ-washington-machine-learning-python-virtualenv
    
    • Customize bin/postactivate from this Git repo.

    • Activate the new virtual environment

          deactivate # deactivate if already in
          workon
          workon univ-washington-machine-learning-python-virtualenv
          # cd path/to/project
      
    • Install packages which should be automatically run via bin/postactivate, but also alternatively, manually by:

          pip install --upgrade pip
          pip install --upgrade "ipython[notebook]"
          pip install --upgrade matplotlib
          pip install --upgrade --no-cache-dir https://get.dato.com/GraphLab-Create/1.8.4/XXX@gmail.com/6BE1-5664-392B-33BD-D0E7-C4C9-1897-D5C8/GraphLab-Create-License.tar.gz            
      
  • Configure matplotlib backend to TkAgg in ~/.matplotlib/matplotlibrc 4:

      backend: TkAgg
    

Alternatively, in Jupyter notebook, run

    import matplotlib
    #matplotlib.use('qt4agg')
    matplotlib.use('tkagg')

before plotting.

References

Footnotes

  1. Python virtual environments (virtualenv package), http://docs.python-guide.org/en/latest/dev/virtualenvs

  2. Python virtual environment wrappers (virtualenvwrapper package), https://virtualenvwrapper.readthedocs.org

  3. `virtualenvwrapper quick-start, https://virtualenvwrapper.readthedocs.org/en/latest/install.html#quick-start

  4. http://matplotlib.org/faq/virtualenv_faq.html

About

University of Washington Machine Learning course (https://www.coursera.org/specializations/machine-learning) Python virtual environment.


Languages

Language:Shell 100.0%