PyCharm can't find a reference yet it definitely exists

10,889

Solution 1

Try File->Invalidate Caches/Restart...

This worked for me.

Solution 2

One possible problem is that your interpreter setting is wrong. When you have multiple versions of python installed and only one has numpy installed, if pycharm choose the wrong interpreter, then you get the error.

Share:
10,889
Nanor
Author by

Nanor

Updated on July 02, 2022

Comments

  • Nanor
    Nanor about 2 years

    I'm trying to use a thing in numpy.random which I import using from numpy.random import normal. PyCharm tells me this is an unresolved reference despite being able to find other things in numpy.random such as numpy.random.random.

    Whenever I open up a Python shell and type from numpy.random import normal it runs fine and I can use normal just as I desire in the terminal.

    Why is this?