我有一个Python脚本,当我在Spyder或其他编辑器/ IDE中运行它时,它运行完美,但是当我双击它或尝试通过Pentaho Shell步骤运行时,因为我正在使用熊猫模块,因此运行。Python命令行无法识别模块
错误:
2017/09/25 16:00:18 - etl_script.py - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : (stderr) Traceback (most recent call last):
2017/09/25 16:00:18 - etl_script.py - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : (stderr) File "C:\Users\giorge.luiz\etl_script.py", line 8, in <module>
2017/09/25 16:00:18 - etl_script.py - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : (stderr) import pandas as pd
2017/09/25 16:00:18 - etl_script.py - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : (stderr) ImportError: No module named pandas
我怎样才能解决这个问题?
您是否安装了多个python版本?你是否在虚拟环境中运行? – CoryKramer
可能是因为它不是从IDE或资源管理器激活的相同安装; –