Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
401 views
in Technique[技术] by (71.8m points)

visual studio code - Why can't I peek the definition of some modules of Python in VSCode?

Short question :

enter image description here

Why??

I did install pywin32.And I can peek definition of other packages just fine. And my program works just fine. I just can't work out why I can't peek the definition of it?

And moreover, how does python found some package was actually installed ? By looking for the subfolder inside site-packages ?

question from:https://stackoverflow.com/questions/66046327/why-cant-i-peek-the-definition-of-some-modules-of-python-in-vscode

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Might be helpful to check if you are running the right version of python with vscode.

In short- you might have different versions of python installed on your pc, installed by you or some other work environments(vscode might have installed one for you). You can see the current running version on the bottom left the bottom left of your vscode window(given that you are running the ms-python.python extesnion).

If it is not the appropriate version, you can easily change it by pressing on the text of the version, see below picture:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...