Finally, the problem of python import XXX without function prompt is solved! ! ! ! ! ! ! !
Problem Description
After importing cv2, the program runs without problems, but when using cv2 functions, there is no function prompt. I was very distressed at one time, and writing programs relied on memory. . . . .
But fortunately, today I found inspiration in the blog of a brother with a problem with vscode on ubuntu, and finally found a solution!
If there is a problem with vscode under Linux+conda environment, move: Under Linux environment, VScode import cv2 or other libraries have no function prompt but run normally
Solution
step one
First, it will search in settings python: interpreter Path
,
If yours is still python, please immediately change it to your python path, I am here D:\Python\Python3.70
.
Ok, then restart vscode and try to enter the function to see if there is a prompt. If there is, then it is ok. If it is still not, then please continue to the second step.
Step two
There is one at the bottom of the setting page just now Extensions Path
. If not, search for it, click edit in setting.json ,
find "python.autoComplete.extraPaths"
this item, and complete the path of your expansion package. The specific folder is shown in the figure:
restart vscode! !
Perfect solution! !
Now the function prompt will appear after importing the library!