#LazyLib – Automatically create a venv + install missing libraries

7 messages · Page 1 of 1 (latest)

median horizon
#

What My Project Does:
LazyLib is a small CLI tool that automatically creates/uses a virtual environment and installs missing dependencies based on a script’s imports before running it.

Real-world example:

Instead of

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python script.py

You just run:
python lazylib.py script.py

It handles the rest automatically

GitHub:
https://github.com/snoopzx/lazylib

I’d appreciate feedback on the project 🙏🏼

GitHub

A Python automation tool that dynamically handles library dependencies and virtual environments. No more manual pip install errors! - snoopzx/lazylib

onyx sapphire
granite rover
#

The problem with this is that you can't assume that just because you import foo, you'll get the correct library by doing pip install foo. The name on PyPI and the import name often are identical or similar, but they don't have to be.

#

Most famous example of this is probably that if you import PIL , you don't want to install PIL, but instead Pillow.

median horizon
median horizon
onyx sapphire