StanislavYatsevich / Store_Sales

The project is aimed at stores' sales prediction
0 stars 0 forks source link

Issue with poetry.lock #8

Open astraszab opened 2 weeks ago

astraszab commented 2 weeks ago

Getting the error when running poetry install after pulling latest changes:

:~/projects/Store_Sales$ poetry install
The currently activated Python version 3.9.7 is not supported by the project (^3.12.3).
Trying to find and use a compatible version.
Using python3 (3.12.3)
Creating virtualenv store-sales in /home/astraszab/projects/Store_Sales/.venv
Installing dependencies from lock file

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.

Consequently, the virtual env is created, but no dependencies are installed

StanislavYatsevich commented 2 weeks ago

Getting the error when running poetry install after pulling latest changes:

:~/projects/Store_Sales$ poetry install
The currently activated Python version 3.9.7 is not supported by the project (^3.12.3).
Trying to find and use a compatible version.
Using python3 (3.12.3)
Creating virtualenv store-sales in /home/astraszab/projects/Store_Sales/.venv
Installing dependencies from lock file

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.

Consequently, the virtual env is created, but no dependencies are installed

The project requires Python version ^3.12.3 (meaning any version from 3.12.3 and newer). The Python version currently active when you ran poetry install was 3.9.7, which does not meet this requirement. Make sure that Python 3.12.3 or newer is intalled on your computer. Poetry automatically switches to a compatible version it found on your system.

StanislavYatsevich commented 2 weeks ago

Getting the error when running poetry install after pulling latest changes:

:~/projects/Store_Sales$ poetry install
The currently activated Python version 3.9.7 is not supported by the project (^3.12.3).
Trying to find and use a compatible version.
Using python3 (3.12.3)
Creating virtualenv store-sales in /home/astraszab/projects/Store_Sales/.venv
Installing dependencies from lock file

pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.

Consequently, the virtual env is created, but no dependencies are installed

Also run "poetry lock" command in your terminal to fix the poetry.lock file and install all dependencies.

astraszab commented 2 weeks ago

The Python version installed to the poetry env is correct, as it says in the logs: Using python3 (3.12.3)

poetry.lock should always correspond to what's in pyproject.toml and be the same for every developer (unless they're working on branches with different pyproject.toml. The fact that this issue happens for me right after cloning the repo means that you've probably updated pyproject.toml manually and forgot to run poetry lock, so they are now inconsistent in git.

StanislavYatsevich commented 2 weeks ago

The Python version installed to the poetry env is correct, as it says in the logs: Using python3 (3.12.3)

poetry.lock should always correspond to what's in pyproject.toml and be the same for every developer (unless they're working on branches with different pyproject.toml. The fact that this issue happens for me right after cloning the repo means that you've probably updated pyproject.toml manually and forgot to run poetry lock, so they are now inconsistent in git.

Yes, you are right, thank you. ccfd431