我试图运行spark submit(pyspark)命令。作为spark提交的一部分,我需要提供boto3的依赖关系,因为它是我的代码中的依赖项。我运行以下命令并且没有出现模块错误。
bin / spark-submit --master = local --py-files /home/user/boto3-develop.zip /home/user/py_script.py
Traceback (most recent call last):
File "/home/user/py_script.py", line 16, in <module>
import boto3
ModuleNotFoundError: No module named 'boto3'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/home/user/py_script.py", line 16, in <module>
import boto3
ModuleNotFoundError: No module named 'boto3'
不确定我哪里出错了。