Automatically install missing modules using pip at import time. Best used with virtualenv. Updated fork of original by Carles F. Julia.
Project description
Python3 compatible fork of original pipimport
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pipimport3-0.3.1.tar.gz
.
File metadata
- Download URL: pipimport3-0.3.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e285d432061980ccdb17ae43c2fd4e573446bbc44999e1d2f4011fd6dc1b81b |
|
MD5 | 4f622a6edfbff66f051e388ccde30086 |
|
BLAKE2b-256 | 6794284961031cc8903d600495caaad2de058653940a8f66574545c47bf6d566 |
File details
Details for the file pipimport3-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: pipimport3-0.3.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e097fc9918724f6e7d185839f0f713c3d1200ef1723a2500237e179cbb0897d1 |
|
MD5 | d6f463fbbb8149b6ed04660d81ea984a |
|
BLAKE2b-256 | b24e27b79e1644af870c4b220d45bce366956174b07991014e4bc8a729c1ff26 |