zipimport.ZipImportError: can't decompress data; zlib not available in spark(ubuntu 16.04 LTS)
8,321
Answer to a similar question raised here suggested installing zlib1g-dev
in order to solve this error:
sudo apt-get install zlib1g-dev
More info about zlib1g-dev
Note: If you have a spark cluster, you might need to install the package on every node in the cluster.
Author by
Jiteesh
Updated on September 18, 2022Comments
-
Jiteesh over 1 year
I am trying to use the
countbyvalue()
function and it gave me the following error:File "/usr/local/lib/python3.5/runpy.py", line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/local/lib/python3.5/runpy.py", line 109, in _get_module_details __import__(pkg_name) zipimport.ZipImportError: can't decompress data; zlib not available
I see solutions for this as to configure python again but while configuring it says
--with-zlib-dir
is an unrecognized option.I am not sure if it would change any, on proceeding further, even it couldn't recognize the option
How can I solve it?
-
David Foerster about 6 yearsHow exactly did you or are you trying to install Python 3.5?
-
Jiteesh about 6 yearsI have downloaded the package and configured it, install and make install
-
David Foerster about 6 yearsWe need more detail. What exactly did you download? How exactly did you configure it and what was the output of the configuration run? If you didn't record it, please try to replicate it. Could you please edit your post when you want to clarify something or add information? It’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks.
-
Jiteesh about 6 yearsHey David. it worked out. Thank you for the response. Yes I will be including the details from next time. Appreciate your time.
-
-
Jiteesh about 6 yearsHello Yaron, Thank you for the response. Appreciate it. I am using stand alone mode for spark and using it in jupyter notebook. I have already installed it but its the same error I am facing.
-
Yaron about 6 yearsDid you try to restart after you installed zlib package? Also, it might be a problem with the iPython/spark installation
-
Jiteesh about 6 yearsYes. I have, just now, installed the package and restarted the system. Same error though
-
Jiteesh about 6 yearsI have also tried to configure zlib by editing comments in setup file in Modules. still not able to make any changes
-
Jiteesh about 6 yearsIt seems what you thought is right. The problem is with ipython. unable to recognize zlib. in terminal the commands like countbyvalue are working fine. Can you suggest how to fix this. in ipython(jupyter notebook)... Thanks in advance
-
Elder Geek about 6 yearsDirect link to answer: unix.stackexchange.com/a/334103/67643