Pycharm error Django is not importable in this environment

前端 未结 17 1100
情话喂你
情话喂你 2021-02-01 13:00

I\'m getting the following errors in Pycharm.

Error: Django is not importable in this environment

It used to work well but I moved t

17条回答
  •  日久生厌
    2021-02-01 13:05

    I had the same problem and it was due to having more than one project interpreter defined in the project. In my case I had a python 2.7 and a python 3.7 interpreter. Fixed this issue by removing the python 2.7 interpreter.

    1. View the current interpreter by navigating to Preferences > Project > Project Interpreter

    2. Open the dropdown and select Show All...

    3. Remove any interpreters that aren't your primary

提交回复
热议问题