运行用批处理文件导入模块的python脚本

2024-05-15 10:00:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个python脚本,需要与批处理文件一起运行,我当前的批处理文件如下所示

"C:\Users\MarkB\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\MarkB\PycharmProjects\proj\venv\Rdir\extractor.py"
 pause

运行批处理时,我收到以下错误ModuleNotFoundError:没有名为“pandas”的模块

我已经在我的虚拟环境中安装了pandas,当从IDE运行时,程序运行良好。批处理文件和脚本位于同一目录中,批处理文件可以运行不导入任何非标准模块的脚本


Tags: 模块文件脚本pandasvenvlocalexeusers