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
I finally found the error. The problem was that one folder name in the virtualenv path had an accent.
This is the old path:
/Users/plorenzo/../telefónica/gestorSchools/venv
This is the new one that works:
/Users/plorenzo/../telefonica/gestorSchools/venv
In my case, I was running the Cygwin version of Python when this error came up. Fixing it involved just adding some of cygwin's bin paths to Window's Path variable.
Run "control sysdm.cpl"
Go to the "Advanced" tab
Click the "Environmental Variables" button at the bottom of this tab
Find "Path" under "System Variables"
Add to it
;c:/cygwin/bin;c:/cygwin/sbin;c:/cygwin/usr/local/bin
I did not include /usr/bin, as for some reason, it is combined in to the /bin directory when viewing in windows.
Ok, in my case the solution was:
I exited and reloaded the project a few times in there so that might also be necessary. I love PyCharm but starting a new project is always painful.
steps :
1. Choose File Option
2. Setting
3. Scroll to Project -> Select Python Interpreter
4. Project Interpreter
5. Click on Setting icon and press Add environment
6. Create a Virtual Environment
Yet another case, where my virtualenv did have Django installed, but Pycharm would still display this error.
I eventually found out that the same virtualenv path had been duplicated in the list of available interpreters. Removing all of them and re-adding fixed it.
The duplication happened after I copied the .idea from another machine, and re-created the virtualenv from Pycharm although it was already listed as a (broken) interpreter.