Question

Trying to install IMAPClient using the command pip install IMAPClient. I'm on Windows, with Python 3.3.

It downloads fine, begins to install, then complains with ImportError: No module named 'response_parser'. I think that is an internal module for this library, so isn't something I can install separately.

I also tried to download the tarball manually, unpack it, and run python setup.py install, but get the same error.

This is a popular and stable library, so I realise I'm doing something wrong. I'm still a Python noob. What should I do?

Was it helpful?

Solution

From the home page:

Python versions 2.4 through 2.7 are currently supported. Python 3 support is in the works.

It would be nicer if they updated the setup file and/or the package metadata so it could immediately give you a clear error saying "Python 3 is not yet supported" or the like, instead of a mysterious failure from the middle of the setup process. But many projects don't bother to do that, preferring to put that energy into finishing the Python 3 port instead.


However, if you look at the source page:

Python versions 2.6, 2.7, 3.2, and 3.3 are officially supported.

So, it looks like the Python 3 support is actually done, but just hasn't been pushed to PyPI yet.

Which means that, if you have mercurial installed, you should be able to do this:

pip-3.3 install hg+https://bitbucket.org/mjs0/imapclient

If you don't have mercurial (and don't want to install it), download the zipfile from the source page, unzip it, and pip-3.3 install . or python3.3 setup.py install from inside the source tree.


If you plan on distributing Python 3 code that requires IMAPClient, you may want to scan the mailing list archives (or join the mailing list and ask) to find out when it will be updated on PyPI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top