[英]Visual studio says psutil module not found even though it's installed
[英]Pandas not found in Visual Studio Code even though it is definitely in the env
我在两台机器上运行 Visual Studio Code,两者的设置方式基本相同。 一个是 iMac,另一个是 MacBook Air。 在我的一个项目中,在 iMac 上,它无法识别 pandas 已安装,即使它在环境中也是如此。
这是 VSC python 解释器选择:
在这里你可以看到:
我试过卸载 pandas 并重新安装它,但这没有帮助。 我试过确保它在非环境 python 安装中(它是),但这没有帮助。
我在同一台计算机上的其他项目的设置方式基本相同,并且 pandas 工作正常。 我的笔记本电脑上也有相同的项目,具有相同的设置,它也在那里工作。 我有点难过。 我想我现在会在笔记本电脑上处理它,但我会很感激人们可能有任何见解......
import pip
pip.main(["freeze"])
谢谢! 迪伦
根据您的描述,可以参考以下步骤的命令:
在 VSCode 中输入当前的虚拟环境。
Enter ' pip --version
' to check if the pip currently used is from the current environment: (This ensures that using pip to install pandas module will be put into the current virtual environment.)
安装后:(我使用命令' pip install pandas
'(windows10), mac: pip3 install pandas
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.