Pythagora-io / gpt-pilot

The first real AI developer
Other
29.06k stars 2.91k forks source link

fix error message in case of missing Python packages #997

Closed senko closed 3 weeks ago

senko commented 4 weeks ago

This fixes the error message to:

Demo

Before (notice incorrect location for requirements.txt):

$ python3 main.py
Python environment for Pythagora is not set up.
Please create Python virtual environment: /usr/bin/python3 -m venv /home/senko/Projects/Pythagora/venv
Then install the required dependencies with: /home/senko/Projects/Pythagora/venv/bin/python -m pip install -r /home/senko/Projects/Pythagora/requirements.txt

Now (notice correct location, and reporting of exact package whose import failed):

$ python3 main.py
Python environment for Pythagora is not set up: module `pydantic` is missing.
Please create Python virtual environment: /usr/bin/python3 -m venv /home/senko/Projects/Pythagora/gpt-pilot/venv
Then install the required dependencies with: /home/senko/Projects/Pythagora/gpt-pilot/venv/bin/python -m pip install -r /home/senko/Projects/Pythagora/gpt-pilot/requirements.txt