繁体   English   中英

python 库未在 Visual Studio 2022 中导入

[英]python libraries are not imported in Visual Studio 2022

My Environment in VS 2022 is Python 3.8 (same as the Python version installed on my system), I installed all packages like numpy, matplotlib, pandas and etc. using pip install, and it said successfully installed. 但是当我导入它们时,我得到“无法从源解析导入(lib 的名称)”报告。 任何帮助将不胜感激。

我遇到了类似的问题,我的解决方案是:

  1. 检查以确保我的 python 环境运行正常。 我的坏了,pip 命令默认为我的系统 python。
  2. 确保您的 python 环境可以从 Visual Studio 中的 power-shell 启动。 我的有一个权限错误,导致环境无法加载。

如果这些不是问题,我会建议添加错误日志或更多详细信息,因为很难准确找出问题所在。

暂无
暂无

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

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