我试图在PyCharm上安装pyspark
,但最终出现以下错误:
Collecting pyspark
Using cached https://files.pythonhosted.org/packages/37/98/244399c0daa7894cdf387e7007d5e8b3710a79b67f3fd991c0b0b644822d/pyspark-2.4.3.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Could not import pypandoc - required to package PySpark
Download error on https://pypi.org/simple/pypandoc/: [Errno 60] Operation timed out -- Some packages may not be found!
Couldn't find index page for 'pypandoc' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno 60] Operation timed out -- Some packages may not be found!
No local packages or working download links found for pypandoc
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/m6/x3v1x7255lv_w_vsp0zz_jw8hvmgc7/T/pycharm-packaging/pyspark/setup.py", line 224, in <module>
'Programming Language :: Python :: Implementation :: PyPy']
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pypandoc')
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m6/x3v1x7255lv_w_vsp0zz_jw8hvmgc7/T/pycharm-packaging/pyspark/
我尝试通过首选项->项目解释器->单击'+'->搜索pyspark
->单击安装软件包
已安装的相关软件包:
pip v19.1.1
(最新)
setuptools v41.0.1
(最新)
ez-setup v0.9
(最新)
请注意,我能够安装其他软件包。
有人可以在这里说些什么吗?
答案 0 :(得分:1)
如错误所示:
No local packages or working download links found for pypandoc
您应该先安装pypandoc
,然后再尝试安装pyspark
软件包。