Unresolved reference: 'django' error in PyCharm
I assume you're using a virtualenv which is located in the same directory as other project files. Python should know exactly that path. So, it's possibly that Pycharm is using the wrong Interpreter.
Go to Settings -> Project: -> Project Interpreter -> switch to the right path
In the interpreter packages, there should be Django package installed. If not, do it here/in terminal.
Above answers are answered partially.
Problem Description: I've multiple versions of python installed and Django is installed in one of Python version. There are two issues
Issue 1: Pycharm has wrong python interpreter. For this the
Project Interpreter
has to be changed to Python version where Django is installed. Solution: Follow all steps.Issue 2: Django isn't listed as package. For this we need make available the installed python packages in the Pycharm environment. Solution: Follow all steps except step 3.
Solution:Peform following steps.
- In preference/settings go to
Project
>Project Interpreter
- On right hand side click on
settings icon
>Add Local
- Select correct Python version from
Base Interpreter
- Mark the checkbox against
Inherit global site-packages
andMake available to all projects
- Click
ok
Once this is done in Project Intepreter
you will be able to see Django
in the Package list.