问题
I’m trying to use the IMAP client library:
https://imapclient.readthedocs.org/en/stable/
I download the zip:
https://pypi.python.org/pypi/IMAPClient/0.13
Next I used windows command prompt and pip to install:
Ran: pip install imapclient
This placed/created a director in my site-pages directory C:\Python27\ArcGIS10.2\Lib\site-packages\IMAPClient-0.13-py2.7.egg
which I can open and find all the files, but I can’t open IDE and import imapclient or run the examples without getting the error:
ImportError: No module named imapclient
Any ideas, what I need to do?
回答1:
You'll need to make sure your PYTHONPATH
is set properly: https://docs.python.org/2/using/windows.html#configuring-python
回答2:
I encountered the same problem and below are the steps is used to install imapclient. Step1: Clone IMAPClient repository to install it from source.
git clone https://github.com/mjs/imapclient.git
Step2: Navigate to imapclient folder on your computer. Mine was installed on my home directory on linux so the command i used was:
$ cd imapclient/
Step3: Time to install imap using pip while inside the imapclient folder.
pip install -e .
PS:NOTE THE dot(.) ARGUMENT PASSED ON THE COMMAND.
Above installation steps in screenshot
Using your system change directory command, navigate to the cloned imap client folder
pip install and verify on the python interpreter.
来源:https://stackoverflow.com/questions/33266430/how-to-install-imapclient