SlideShare a Scribd company logo
Using Python Packages
        An Overview



          Daniel Hepper
    <daniel.hepper@epicco.de>
          @danielhepper
     PyCologne – 12.01.2011
Using Python Packages
                             An Overview
 ●   distutils
                                                             A lot of names,
 ●   Setuptools                                             a lot of confusion.
      ●   easy_install
     Distribute
                                            ???
 ●


 ●   pip
 ●   virtualenv
 ●   virtualenvwrapper

12.01.2011               Daniel Hepper <daniel.hepper@epicco.de>                  2
distutils
     $ python setup.py install
 ●   allows building and installing modules
 ●   part of standard library since Python 1.6
 ●   no uninstalling or listing of packages
 ●   no dependency handling




12.01.2011         Daniel Hepper <daniel.hepper@epicco.de>   3
setuptools
     $ easy_install MyPackage
 ●   created by Phillip J. Eby
 ●   enhancements to distutils
 ●   handles dependencies
 ●   introduces egg files
 ●   download packages from PyPI
 ●   no uninstalling of packages
 ●   currently unmaintained

12.01.2011           Daniel Hepper <daniel.hepper@epicco.de>   4
Distribute
 ●   created by the The fellowship of the packaging
 ●   fork of setuptools
 ●   drop-in replacement
 ●   actively maintained
 ●   support for Python 3




12.01.2011         Daniel Hepper <daniel.hepper@epicco.de>   5
Pip
 ●   written by Ian Bicking
 ●   stands for Pip Installs Python
 ●   replacement for easy_install
 ●   uninstallation of packages
 ●   requirements files
 ●   native support for other VCS
 ●   no eggs!

12.01.2011         Daniel Hepper <daniel.hepper@epicco.de>   6
Pip Commands
 ●   install: Install packages
 ●   uninstall: Uninstall packages
 ●   freeze: Output all currently installed packages
 ●   search: Search PyPI
 ●   bundle: Create pybundles
 ●   help: Show available commands
 ●   unzip: Unzip individual packages
 ●   zip: Zip individual packages
12.01.2011          Daniel Hepper <daniel.hepper@epicco.de>   7
Searching
$ pip search django
django­gencal             ­ django­gencal is a resuable Djan
emencia.django.downloader ­ Downloader app like dl.free.fr i
django­voting             ­ Generic voting application for D
django­composition        ­ `django­composition` provides th
django­invitation         ­ Built on top of django­registrat
…
django­cnotes             ­ Django cnotes provides a simple 
django_messages_framework ­ Backport of django (dev)'s messa
blogango                  ­ A django based blog
django­fancy­autocomplete ­ A simple AJAX autocomplete helpe

12.01.2011            Daniel Hepper <daniel.hepper@epicco.de>   8
Freezing & Requirements files
$ pip freeze
Brlapi==0.5.5
CouchDB==0.6
Couchapp==0.7.2
GnuPGInterface==0.3.2
GoldenRatio==1.0.0
Jinja2==2.5.5
Mako==0.3.4
MarkupSafe==0.9.2
PAM==0.4.2
PIL==1.1.7
...
12.01.2011           Daniel Hepper <daniel.hepper@epicco.de>   9
Freezing & Requirements files
$ pip freeze > requirements.txt
$ pip ­r requirements.txt




12.01.2011      Daniel Hepper <daniel.hepper@epicco.de>   10
Virtualenv
 ●   written by Ian Bicking
 ●   creates isolated Python environments
     $ virtualenv ENV
      ●   creates ENV/lib/pythonX.Y/site­packages
      ●   install interpreter in ENV/bin/python
      ●   installs Setuptools, ­­distribute installs Distribute
      ●   no site packages with ­­no­site­packages
 ●   activate with . bin/activate
12.01.2011             Daniel Hepper <daniel.hepper@epicco.de>   11
virtualenvwrapper
 ●   written by Doug Hellmann
 ●   set of extensions to virtualenv
 ●   puts environments in one place
 ●   easy switching between environments
 ●   hook scripts




12.01.2011          Daniel Hepper <daniel.hepper@epicco.de>   12
Summary
             enhanced by                          replaced by
 distutils                 Setuptools                             Distribute
                                      provides
                                                                 provides

                           easy_install
                                     replaced by


                                           supports
                                pip                       virtualenv
                                                                     extended with


                                                 virtualenvwrapper
12.01.2011             Daniel Hepper <daniel.hepper@epicco.de>                       13
References
 ●   distutils documentation
         http://docs.python.org/library/distutils.html
 ●   setuptools on Python Package Index
         http://pypi.python.org/pypi/setuptools
 ●   Distribute documentation
         http://packages.python.org/distribute/
 ●   Pip documentation
         http://pip.openplans.org/

12.01.2011             Daniel Hepper <daniel.hepper@epicco.de>   14
References (cont.)
 ●   virtualenv documentation
     http://virtualenv.openplans.org/
 ●   virtualenvwrapper homepage
     http://www.doughellmann.com/projects/virtualenvwrapper/
 ●   “Der Eierkocher”, talk by Chris Arndt (German)
     http://chrisarndt.de/talks/cooking-eggs/cooking-eggs-vortrag.html




12.01.2011              Daniel Hepper <daniel.hepper@epicco.de>    15

More Related Content

PDF
Arbeiten mit distribute, pip und virtualenv
PDF
Nuget is easier than you think and you should be using it as both a consumer ...
PDF
Python packaging and dependency resolution
PDF
Current State of Python Packaging
PDF
Arbeiten mit distribute, pip und virtualenv
PPTX
Python Programming Essentials - M16 - Control Flow Statements and Loops
PDF
We Buy Cheese in a Cheese Shop
PPTX
Python Programming Essentials - M18 - Modules and Packages
Arbeiten mit distribute, pip und virtualenv
Nuget is easier than you think and you should be using it as both a consumer ...
Python packaging and dependency resolution
Current State of Python Packaging
Arbeiten mit distribute, pip und virtualenv
Python Programming Essentials - M16 - Control Flow Statements and Loops
We Buy Cheese in a Cheese Shop
Python Programming Essentials - M18 - Modules and Packages

Viewers also liked (20)

PDF
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
PPTX
Python, Development Environment for Windows
PDF
Python Recipes for django girls seoul
KEY
Overview of Testing Talks at Pycon
PDF
2 × 3 = 6
PDF
NoSql Day - Chiusura
PDF
PythonBrasil[8] closing
PDF
Website optimization
ODP
Rabbitmq & Postgresql
PDF
Django - The Web framework for perfectionists with deadlines
PDF
Vim for Mere Mortals
PPT
Load testing
PDF
Bottle - Python Web Microframework
PDF
라이트닝 토크 2015 파이콘
PDF
PyClab.__init__(self)
PDF
The Django Book, Chapter 16: django.contrib
ODP
Authentication & Authorization in ASPdotNet MVC
PDF
Django e il Rap Elia Contini
PPT
Html5 History-API
PDF
The Django Book Chapter 9 - Django Workshop - Taipei.py
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Python, Development Environment for Windows
Python Recipes for django girls seoul
Overview of Testing Talks at Pycon
2 × 3 = 6
NoSql Day - Chiusura
PythonBrasil[8] closing
Website optimization
Rabbitmq & Postgresql
Django - The Web framework for perfectionists with deadlines
Vim for Mere Mortals
Load testing
Bottle - Python Web Microframework
라이트닝 토크 2015 파이콘
PyClab.__init__(self)
The Django Book, Chapter 16: django.contrib
Authentication & Authorization in ASPdotNet MVC
Django e il Rap Elia Contini
Html5 History-API
The Django Book Chapter 9 - Django Workshop - Taipei.py
Ad

Similar to Using Python Packages - An Overview (20)

PDF
Virtualenv
PDF
Welcome to the Cheese Shop: setuptools, virtualenv and PyPUG
PDF
Python+gradle
ODP
Python-specific packaging
PPTX
E D - Environmental Dependencies in Python
PDF
Build and deploy scientific Python Applications
PDF
delivering applications with zc.buildout and a distributed model - Plone Conf...
PPTX
Pipenv - The Python Companion You Wish You Always Had
PPT
10 11-hart installing pythonsoftware
ODP
5 minute intro to virtualenv
PDF
Python packaging: how did we get here, and where are we going?
PPTX
Run Python on windows
PDF
Effectively using Open Source with conda
PDF
Bento lunch talk
PPTX
How to deliver a Python project
PDF
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
PDF
Package Management via Spack on SJTU π Supercomputer
PDF
PyBCN - pipenv - python dev workflow for humans
PDF
Open source projects with python
PPTX
Overview of python misec - 2-2012
Virtualenv
Welcome to the Cheese Shop: setuptools, virtualenv and PyPUG
Python+gradle
Python-specific packaging
E D - Environmental Dependencies in Python
Build and deploy scientific Python Applications
delivering applications with zc.buildout and a distributed model - Plone Conf...
Pipenv - The Python Companion You Wish You Always Had
10 11-hart installing pythonsoftware
5 minute intro to virtualenv
Python packaging: how did we get here, and where are we going?
Run Python on windows
Effectively using Open Source with conda
Bento lunch talk
How to deliver a Python project
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Package Management via Spack on SJTU π Supercomputer
PyBCN - pipenv - python dev workflow for humans
Open source projects with python
Overview of python misec - 2-2012
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
MYSQL Presentation for SQL database connectivity
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The AUB Centre for AI in Media Proposal.docx
Spectral efficient network and resource selection model in 5G networks
MIND Revenue Release Quarter 2 2025 Press Release
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MYSQL Presentation for SQL database connectivity
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Encapsulation_ Review paper, used for researhc scholars

Using Python Packages - An Overview