Skip to content

Simple package to lookup missing packages and autoinstall them.

License

Notifications You must be signed in to change notification settings

probml/superimport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

superimport

Simple package to lookup missing packages and autoinstall them.

Installing using PyPi:

pip install superimport

Usage:

There are two ways to use superimport:

  • superimport can be called as a program, see -h for args. This allows you to do "superimports" across mulitple files and folders.
  • by adding import superimport to the top of your python script. This is the per script mode.

Examples:

See this notebook

Open In Colab

🔪 Sharp edges 🔪:

  • If the missing python package contains a requirement that is not listed in its own requirements.txt and is being used your file will fail anyway.
  • If you import superimport twice in the same process (a common usecase is ipython kernels), the second time will not work because of the way python loads modules , you would need a something like deimport to deimport the package before being able to import superimport to the desired effect again.
  • If you run superimport in ipython, please use deimport to deimport superimport and use %run -n if you use %run

About

Simple package to lookup missing packages and autoinstall them.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages