Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named zlib #690

Closed
shimizukawa opened this issue Jan 2, 2015 · 2 comments
Closed

ImportError: No module named zlib #690

shimizukawa opened this issue Jan 2, 2015 · 2 comments

Comments

@shimizukawa
Copy link
Member

zlib is installed on CentOS 5.5, but Sphinx/pickled does not locate it

$ sh -x build.sh

  • python setup.py build_sphinx
    running build_sphinx
    Running Sphinx v1.0.7
    loading pickled environment... not yet created
    Traceback (most recent call last):
    File "setup.py", line 15, in
    license='Mezeo Software Corporation All Rights Reserved',
    File "/usr/local/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
    File "/usr/local/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
    File "/usr/local/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.4/site-packages/Sphinx-1.0.7-py2.4.egg/sphinx/setup_command.py", line 136, in run
    freshenv=self.fresh_env)
    File "/usr/lib/python2.4/site-packages/Sphinx-1.0.7-py2.4.egg/sphinx/application.py", line 136, in init
    self._init_builder(buildername)
    File "/usr/lib/python2.4/site-packages/Sphinx-1.0.7-py2.4.egg/sphinx/application.py", line 196, in _init_builder
    import('sphinx.builders.' + mod, None, None, [cls]), cls)
    File "/usr/lib/python2.4/site-packages/Sphinx-1.0.7-py2.4.egg/sphinx/builders/html.py", line 14, in
    import zlib
    ImportError: No module named zlib

$ uname -a; cat /etc/issue; rpm -qa | egrep zlib
Linux ereo-centos.datadirect.datadirectnet.com 2.6.18-194.11.3.el5 #1 SMP Mon Aug 30 16:19:16 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
CentOS release 5.5 (Final)
Kernel \r on an \m

zlib-1.2.3-3
zlib-devel-1.2.3-3
zlib-devel-1.2.3-3
zlib-1.2.3-3


@shimizukawa
Copy link
Member Author

From carlandvalerie on 2011-05-02 21:20:19+00:00

Upgraded from python 2.5.5 to 2.6.6 and it works fine now.
Shouldn't the python version be checked when Sphinx is called.

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2011-05-15 09:43:57+00:00

This can happen if you build your Python before installing the zlib development headers.

(The zlib packages only contain the library, not the Python module.)

In any case, this is not a Sphinx issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant