Recent Changes - Search:

Making

Photography?

Coding

Cooking

Projects

PmWiki

edit SideBar

Python

Python

Installing

  • Anaconda or another IDE
  • Anaconda includes the conda tool
  • pip package manager (comes with conda): pip

Setup (with conda)

conda update conda # Will update conda to the latest version

Create new environment with a specific version of python, including some packages/libraries:

conda create --name <envname> python=3 <packages list>

source activate <envname>

(work within the environment)

source deactivate

Potentially outdated info: Apparently, Apple now uses a compiler that treats unknown arguments as hard errors and this can break pip installs. A temporary workaround is to use the following command every time pip is used (source):

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install xxxxx

Also likely to affect Homebrew et al.

Useful libraries

  • pandas: sophisticated data analysis library
  • agate: easy to use/read data analysis library, e.g. for data journalism
  • guess_language: guess the natural language of a text. Works better for longer texts and for actual sentences, performs very poorly on book titles (I tried).

IDEs

  • Wing
  • IPython + web thingy

References

  • SW Carpentry class

Resources


Django

= framework for building web applications in Python.

Alternatives

  • Flask for small projects.

Deployment

Possibilities:

Info on deploying in the Django book. Using FastCGI

References

Edit - History - Print - Recent Changes - Search
Page last modified on February 12, 2017, at 21:25 EST