I am using PyCharm to work on a project. The project is opened and configured with an interpreter, and can run successfully. The remote interpreter paths are mapped properly. This seems to be the correct configuration, but PyCharm is highlighting my valid code with "unresolved reference" errors, even for built-in Python functions. Why don't these seem to be detected, even though the code runs? Is there any way to get PyCharm to recognize these correctly?
This specific instance of the problem is with a remote interpreter, but the problem appears on local interpreters as well.
None of the above solutions worked for me!
If you are using virtual environment for your project make sure to apply the
python.exe
file that is inside your virtual environment directory as interpreter for the project(Alt + Ctrl + Shift + S)
this solved the issue for me.In my case it was the directories structure. My project looks like this:
So right click on dir_b > "mark directory as" > "project root"
Sorry to bump this question, however I have an important update to make.
You may also want to revert your project interpreter to to Python 2.7.6 if you're using any other version than that This worked for me on my Ubuntu installation of PyCharm 4.04 professional after none of the other recommendations solved my problem.
It could also be a python version issue. I had to pick the right one to make it work.
If none of the other solutions work for you, try (backing up) and deleting your ~/.PyCharm40 folder, then reopening PyCharm. This will kill all your preferences as well.
On Mac you want to delete ~/Library/Caches/Pycharm40 and ~/Library/Preferences/PyCharm40.
And on Windows: C:\Users\$USER.PyCharm40.
Dmitry's response didn't work for me.
I got mine working by going to Project Interpreters, Selecting the "Paths" tab, and hitting the refresh button in that submenu. It auto-populated with something called "python-skeletons".
edit: screenshot using PyCharm 3.4.1 (it's quite well hidden)