[从我的python脚本运行python文件时导入错误

问题描述 投票:0回答:2

我正在尝试从python脚本运行python脚本。

我试图像这样运行它:os.system("python /opt/mycroft/skills/useridentification-skill/speakerIdentificationProgram/scoring.py")

然后我尝试导入文件,如下所示:import sys sys.path.append("/opt/mycroft/skills/useridentification-skill/speakerIdentificationProgram") from scoring import get_id_result

他们都返回此错误:File "/opt/mycroft/skills/useridentification-skill/__init__.py", line 9, in <module> from scoring import get_id_result File "/opt/mycroft/skills/useridentification-skill/speakerIdentificationProgram/scoring.py", line 2, in <module> import numpy ImportError: No module named 'numpy''''

有人可以帮忙吗?

谢谢

python python-3.x ubuntu-16.04
2个回答
0
投票

使用熊猫库进行数据处理和文件访问。


0
投票

只需在您的终端上尝试pip install numpy。这将删除错误

© www.soinside.com 2019 - 2024. All rights reserved.