Solutions to Django is not importable in this environment

Django is not importable in this environment.
(1) the first thing to illustrate the point, now on the network all kinds of copy, about today I encountered this problem, didn’t find a good way to online, and open a, then open a, completely identical copy, was no, really is too sad, to solve the problem it took me 4 to 5 hours (I am a rookie!
If this article does not obtain my consent, do not reprint and plagiarism!
(2) PyCharm downloaded from the Internet or copied from other computers cannot be opened directly, and some Settings need to be made, which is very annoying! Of course, the main problem is to set up the interpreter, but there are other problems, such as Django is not importable in this environment. My software version is python3.4.3 and django 2.0.7
(3) Solutions to this problem:
The file – & gt; Open, find your project file (project name), as follows, my project file is under the Learn folder, which has 4 projects

Then look at the following:
Select open in the new window to open a new window. Select another window to close the one you are currently open.

My entire project list is as follows:

It doesn’t matter that my project name is not the same as zaxt_tMP12 under the project.
And then: file – & gt; Settings – & gt; Project Interpreter

Then, look at the picture:

Hide interpreters that connect to other projects:

The effect is as follows, then green + :

If it’s OK, the result is like this (don’t follow it here, I’m just showing you!! :

Django is not importable in this environment if you don’t grab Inherit global site-packages, you will get an error when you run.



Very distressed! ?You’ve been messing with me for a long time. In fact, here’s what you should do:

Then, apply – & gt; ok

Django is out!!
(4) Finally, add an interpreter:

Select the interpreter we set up in the previous step! And run manager.py Runserver. Click Run again and you’re ready to run!

It took quite a while to write the document, redid it and liked it if it helped.
If this article does not obtain my consent, do not reprint and plagiarism!

Read More: