1

Why I need it: I've run into an issue where I first wrote a python script using imapclient to check my gmail using Python 2.7. Then continuing the path to full automation I made another script which uses subprocess.run which is not supported in Python 2.7. So the issues is I can't use python 2.7 with imapclient AND python 3.5 subprocess.run in the same python script. However, https://pypi.org/project/IMAPClient/ states the following:

Python versions 2.7 and 3.4 through 3.7 are officially supported.

What I need: How do I install imapclient to python 3.5.3 in Raspbian Stretch? The following only installs it to Python 2.7:

sudo pip install imapclient
2

Python 2 and 3 use their own (separate) libraries and you have to install it for both versions separately.

Replace pip with pip3 to install for Python 3:

sudo pip3 install imapclient

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.