Answer the question
In order to leave comments, you need to log in
Why do imports work in one project and not in another?
As short and to the point as possible.
Two projects are arranged as similar as possible - each of them has its own runtime environment.
I install dependencies as expected: & pip install ./requirements.txt
To which in response I get many lines stating that everything is already installed.
But all the same - the left project is not launched. The error is visible in the console - does not find the flask module.
At the same time, the right project is successfully launched and everything is OK. Has anyone encountered a similar problem?
Answer the question
In order to leave comments, you need to log in
maybe because Windows finds pip3 in PATH and uses it?
Try to specify a direct path to pip3 in a specific venv.
I have a guess:
1. you have different directories (try to write pip install in each directory
2. in projects different versions of python (for example, in the first project 2.9 some, and in the second super version 3.9)
UPD: I carefully examined screenshot, you have different directories, and in the rolefr-accounts directory, the flask module is most likely not loaded. write everywhere & pip3 install ./requirements.txt
(or & pip3 install flask
, this is for python 3.x). it is natural that the requirements.tx file be in your directories, if you specifically load it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question