0

I am new to Python and can't judge if it is error of PyCharm or not, but inside working program I found the following code

enter image description here

Apparently, reference is ok, since program is executing without any error.

UPDATE

As I can judge, interpeter is set correctly:

enter image description here

Dims
  • 47,675
  • 117
  • 331
  • 600
  • 1
    Have you set your project interpreter? Most probably the reason is the interpreter used by PyCharm does not have package `six` installed. – Muhammad Tahir Jan 26 '16 at 10:35
  • Which version of PyCharm do you have? This appears to be a reported bug in PyCharm which was resolved in version 5.0.2 according to https://youtrack.jetbrains.com/issue/PY-15460. Also see http://stackoverflow.com/questions/30311954/pycharm-warns-for-unresolved-reference-builtin-datetime-module?rq=1 – Muhammad Tahir Jan 26 '16 at 12:12
  • I have version 5.0.3 – Dims Jan 26 '16 at 12:14

2 Answers2

0

As Muhammad mentioned it's usually matter of interpreter. You can read more about how to setup it here.

From the docs

Open the Settings dialog box, and click Project Interpreter page. In the Projects pane, choose the desired project. For the selected project, choose SDK from the list of available Python interpreters and virtual environments. This list includes:

Python interpreters, which reside in standard locations. Virtual environments, which reside under the project folder, or under the folder specified as an environment variable WORKON_HOME. Other Python interpreters, installed locally or remotely. If the desired interpreter is not in the list, click cogwheel_framed, and configure the desired interpreter as described in the section Configuring Available Python Interpreters.

T.Chmelevskij
  • 1,904
  • 17
  • 30
0

I think I may have found your solution, as I had pretty much the same problem. If you look at the top of the image you posted you'll see "Project Interpreter" has Python version 2.7.6

That is exactly what mine said and when I selected the drop down I clicked on the only other option that brought up version 3.4.2 and my Unresolved Reference went away.

NewPythonUser
  • 47
  • 1
  • 1
  • 8