Home »
Python »
Python Programs
Why does PyCharm give unresolved reference errors on some NumPy imports?
Learn, why does PyCharm give unresolved reference errors on some NumPy imports in Python, and how fix this issue?
By Pranit Sharma Last updated : April 05, 2023
Sometimes, when we import some functions from numpy or any other module, the PyCharm gives unresolved reference errors for each import.
For example, NumPy's tan(), arcsin(), arccos(), arctan(). However, the code in which we use these imports runs fine without any errors or warnings.
Reason for getting PyCharm unresolved reference errors
The reason we face this issue is because of PyCharm's static analysis. Python uses static skeletons (some are pre-generated and some are generated) to give us the analysis.
Solution for fixing PyCharm unresolved reference errors
To fix PyCharm unresolved reference errors, use the PyCharm environment and update skeletons.
- Click on the "Python version" in the bottom (right) bar to bring up the "interpreter selection" menu.
- Click on the desired interpreter (might already be selected - but click it anyway).
- Clicking it will update the skeletons.
Python NumPy Programs »