pycharm下载库但是运行还是提示库没有下载问题 📅 2026/7/13 4:40:18 明明下载成功但是运行出现File E:\python_study\ctf\test\reverse\ida套壳.py, line 1, in moduleimport pefileModuleNotFoundError: No module named pefile这是一个非常经典的 Python 环境问题pip 安装到的 Python 解释器和你运行脚本 ida套壳.py 时使用的 Python 解释器不是同一个。虽然 pip install pefile 显示成功但它可能装到了系统全局的 Python、Anaconda 的 Python 或者另一个版本的 Python 中而你当前执行脚本的环境里并没有这个包。3步彻底解决1.确认当前运行脚本的 Python 到底是哪个import sysprint(sys.executable)运行代码查看python解释器路径2. 用“绝对路径”精准安装 pefile如果你之后在 CMD而不是 PowerShell中执行同样的命令则不需要加 D:\anaconda\python.exe -m pip install pefile验证是否安装成功 D:\anaconda\python.exe -c import pefile; print(pefile.__version__)3. 检查 IDE/编辑器配置点击右下角的 Python 版本 - Add Interpreter - 选择第1步打印出的那个 Python 路径。