pyspark安装报错
ERROR: Command errored out with exit status 1:
command: /Users/wuyumo/PycharmProjects/spark_study/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-install-4xurhol1/pyspark/setup.py'"'"'; __file__='"'"'/private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-install-4xurhol1/pyspark/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-pip-egg-info-jzv37puh
cwd: /private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-install-4xurhol1/pyspark/
Complete output (47 lines):
Could not import pypandoc - required to package PySpark
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: /Users/wuyumo/PycharmProjects/spark_study/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-wheel-zd3dbdwc/pypandoc/setup.py'"'"'; __file__='"'"'/private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-wheel-zd3dbdwc/pypandoc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-wheel-e4iqfu8e
cwd: /private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-wheel-zd3dbdwc/pypandoc/
Complete output (8 lines):
no pandoc found, building platform unspecific wheel...
use 'python setup.py download_pandoc' to download pandoc.
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for pypandoc
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/wuyumo/PycharmProjects/spark_study/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/tmpvqezun4q', '--quiet', 'pypandoc']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/pip-install-4xurhol1/pyspark/setup.py", line 224, in <module>
'Programming Language :: Python :: Implementation :: PyPy']
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 160, in setup
_install_setup_requires(attrs)
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 155, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/wuyumo/PycharmProjects/spark_study/venv/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/Users/wuyumo/PycharmProjects/spark_study/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ff/hz2prrxs1kv4h594pkwtjdr00000gn/T/tmpvqezun4q', '--quiet', 'pypandoc']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方案:
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ pypandoc
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ pyspark