Pycharm error Django is not importable in this environment

前端 未结 17 1098
情话喂你
情话喂你 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:08

    I had the same problem and I think the solution is not stated here yet. I had to go to Settings > Project Interpreter, click the gears icon on the right and chose the interpreter (which was already correct). Then click on the last icon to the right, the one with some folders structure icon. There I had to add the path to the site-packages of my venv (where Django is). Finally my tests run with no issues.

提交回复
热议问题