繁体   English   中英

在 Visual Studio(2022) 中导入 pandas

[英]import pandas in visual studio(2022)

My Environment in VS 2022 is Python 3.8 (same as the Python version installed on my system), I installed the pandas package using pip install pandas, and it said successfully installed. 但是,当我导入 pandas 时,我得到“无法从源解决导入 pandas”报告。 任何帮助将不胜感激。

版本不匹配问题:

首先,您需要确保终端版本中的 python3 解释器版本与您在 VSCode 中选择的 python 版本相同。

  1. 打开终端
  2. 输入“python3”; 你会看到你的 python 版本(例如版本 x)
  3. 打开你的 IDE VSCode
  4. 在 IDE VSCode 上打开与 python 项目相关的任何/当前文件夹
  5. 检查 IDE VSCode 右下角的 python 版本(例如版本 y)
  6. 将 VSCode python 版本从(版本 y)更改或切换到(版本 x)

暂无
暂无

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

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