简体   繁体   English

如何在 Visual Studio 代码中找到已安装的模块

[英]How to locate installed module inside visual studio code

So i have installed the pandas module, and wanting to execute it has not ne easy as well as some other modules, because i keep getting the NoModuleError.所以我已经安装了 pandas 模块,并且想要执行它并不像其他一些模块那样容易,因为我不断收到 NoModuleError。 Also pylance keeps reperting the missing module source and missing module. pylance 也不断重复缺失的模块源和缺失的模块。 Please how do i rectify this issue and find the missing modules.请问我该如何纠正这个问题并找到丢失的模块。 Thank you.谢谢你。

Python find modules in paths specified in sys.path . Python 在sys.path指定的路径中查找模块。 Check the path where pandas is installed in sys.path import sys print(sys.path)sys.path import sys print(sys.path) 中查看 pandas 的安装路径

If that does not exist in sys.path then you can append the the path where pandas is installed like sys.path.append('path to folder where pandas is installed')如果sys.path中不存在,那么您可以附加安装 pandas 的路径,如 sys.path.append('安装 pandas 的文件夹的路径')

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

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