I open a PyCharm project (Windows 11) and inside PyCharm I run the terminal to install some requirements:
pip install -r requirements.txt
However, when opening a Python file from the same project in the same folder all the modules that should be imported are marked in "red", i.e. "unresolved reference".
It seems that the terminal in PyCharm and PyCharm use a different Python interpreter. Running this on Windows I check what Python is used in the terminal and do:
where python
but I do not get any output.
How to set this up correctly, so that when I install something on the terminal inside PyCharm, PyCharm actually uses that?
python -V
Python 3.10.11
PyCharmhas built-in function to install modules for Python which is assigned to project. You may also run in codeprint( sys.executable )to get/full/path/to/python.exeand later use it in terminal/full/path/to/python.exe -m pip install ...