0

I just installed MS VS Code and all of the recommended extensions for Python, including Pylance. In every tutorial for OpenCV I see, there are descriptions shown for every single function when I type them or hover my mouse above them.

But as you can see in the images below, I get no description.

The information I get:

The information I get

The information I would like to get:

The information I would like to get

In the settings.json I already set languageServer to Pylance.

I also tried uninstalling all the extensions and reinstalled VSCode.

1
  • 1
    The question is not about the code, but about the information displayed by pylance. Thx though Commented Jan 1, 2024 at 17:49

1 Answer 1

0

Your picture shows the description of imread. As for why it is different from your tutorial, I think this is likely to be related to the opencv version. You can view your tutorial release time and install the opencv version of the same period or similar period.

pip install packageName==versionNumber

https://pypi.org/project/opencv-python/#history

About intellisense:

https://code.visualstudio.com/docs/python/editing#_autocomplete-and-intellisense https://code.visualstudio.com/docs/editor/intellisense#_intellisense-features https://typing.readthedocs.io/en/latest/source/stubs.html

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

3 Comments

Thanks for your help. The problem is still there. I tried setting up a new installation of VSCode with Python 3.8.5 and the exact same version of opencv like in the video... Still I don't get to see the docstrings. Seems to be a problem with opencv, because it works well with everything else (numpy, pandas, pyautogui etc.) I also tried it in PyCharm, where I get the same issue...
Can you tell me which version of opencv is?
It's an existing issue not only related to opencv @JialeDu github.com/microsoft/pylance-release/issues/784 github.com/microsoft/pylance-release/issues/844 (no enough reputation to comment, sorry)

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.