Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Automatically install missing modules using pip at import time. Best used with virtualenv.

Project Description

Pipimport automatically installs missing modules using pip at import time. It is best used with virtualenv.

Just import pipimport and call install():

>>> import pipimport
>>> pipimport.install()

Now you can normally import modules that are not currently installed. Pipimport will call pip (form your virtualenv) and install it before importing.

>>> import unipath
Will install module unipath
Downloading/unpacking unipath
  Downloading Unipath-1.0.tar.gz
  Running setup.py egg_info for package unipath
Installing collected packages: unipath
  Running setup.py install for unipath
Successfully installed unipath
Cleaning up...
>>> unipath
<module 'unipath' from '/home/carles/Projectes/piphook/ve/local/lib/python2.7/site-packages/unipath/__init__.pyc'>

The modules that can’t be found are remembered so sequential imports don’t try to download them again. This list is saved in the virtualenv directory ( sys.prefix ) or in the working directory (the first with writing permissions) with the name of .pipimport-ignore . The list is loaded in subsequent sessions.

Release history Release notifications

This version
History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pipimport-0.2.5.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None Nov 7, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page