1

I'm using PyCharm:

PyCharm 2019.2.4 (Community Edition)
Build #PC-192.7142.42, built on October 31, 2019
Runtime version: 11.0.4+10-b304.77 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1

And I'm having troubles to import numpy library.

import numpy as np

Is greyed out and when I run the code nothing happens (Process finished with exit code 0)

I have added numpy to my project's interpreter but it didn't solve the problem

PyCharm Preferences

I have also tried to install numpy with pip command but I'm getting a message that:

Requirement already satisfied: numpy in ./venv/lib/python3.7/site-packages (1.17.4)

Has anyone came across similar problem?

1 Answer 1

2

A gray import in PyCharm is usually just an import you're not using in your code. If that's the only line of code using np, no errors (exit code 0) actually means the import was a success

Hovering over marked code (gray or underlined) with your mouse, will show you what it means

Sign up to request clarification or add additional context in comments.

1 Comment

Good! I overlooked that fact that there was no exception, just grey

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.