简体   繁体   English

VS code 无法导入已安装的模块

[英]VS code can't import module which is already installed

安装模块

VS 代码错误信息

I've already installed the module "pandas" through pip3, and it's visible through pip3 list .我已经通过 pip3 安装了模块“pandas”,并且可以通过pip3 list看到它。 But VS code still showing the error message.但是 VS 代码仍然显示错误消息。 I was trying to set up some breakpoints to test my code in VS code.我试图设置一些断点来在 VS 代码中测试我的代码。 It works fine while in the terminal.它在终端中工作正常。

Have you selected the correct Python Interpreter inside of VSCode?您是否在 VSCode 中选择了正确的 Python 解释器?

If you have the Python extension installed, you can go into your command prompt, type in Python: Select Interpreter , select the correct environment and VSCode should be able to recognize it.如果你安装了 Python 扩展,你可以进入命令提示符,输入Python: Select Interpreter ,选择正确的环境,VSCode 应该能够识别它。

In case that's the issue :)如果这是问题:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM