Skip to content

Instantly share code, notes, and snippets.

@dustinmm80
Created August 16, 2013 01:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinmm80/6246568 to your computer and use it in GitHub Desktop.
Save dustinmm80/6246568 to your computer and use it in GitHub Desktop.
Cheat sheet for Python workflow tools on OSX

Terminal Cheat Sheet


python package installer - look for packages on pypi

  • pip install package_name - installs package from pypi
  • pip install -r requirements file - installs packages from a requirements file
  • pip uninstall package_name - uninstalls package
  • pip freeze - output packages to stdout in requirements format, can be piped to a file
  • pip show package_name - show information about an installed package
  • pip search query - Search for PyPI packages whose name or summary contains

wrapper for virtualenv - allows you to create sandboxed python environments

  • mkvirtualenv ENV_NAME - creates a virtual environment with specified name
  • rmvirtualenv ENV_NAME - deletes the virtual environment with specified name
  • workon ENV_NAME - switches context to virtual environment with specified name
  • lsvirtualenv - lists all create virtual environments
  • deactivate - exits context of current virtual environment

pythonbrew is a program to automate the building and installation of different Python versions in the users $HOME.

  • pythonbrew list -k - List the available installation pythons
  • pythonbrew list - List installed pythons
  • pythonbrew install version - Installs specified version of Python
  • pythonbrew switch version - Permanently use the specified python
  • pythonbrew use version - Use the specified python in current shell
  • pythonbrew uninstall version - Uninstalls specified version of Python

Vagrant uses Oracle’s VirtualBox to build configurable, lightweight, and portable virtual machines dynamically. These commands are in the context of the currents_services project.

All commands can be passed a box name, optionally. If no box name is passed, the command is run on all machines in the Vagrantfile

  • vagrant up - Create and provision vm
  • vagrant halt - Shut down vm
  • vagrant destroy - Shut down and delete vm
  • vagrant reload - Quickly restart vm
  • vagrant ssh vm_name - SSH into the vm as user vagrant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment