Skip to content Skip to sidebar Skip to footer

How To Install Modules Correctly In Pycharm?

I want to install PIL in python, but it seems I can't install the module correctly, is there anything that can solve the problem? (My python version is 2.7)

Solution 1:

Try installing Pillow, I was facing the same problem and then I figured out that PIL can be installed using the following.

pip install Pillow

Solution 2:

Find your Python path:

which python
/Users/gogasca/anaconda/bin/python

You can install it from IDE itself or Project Settings:

Settings | Project | Project Interpreter |Select the right path, Click +andadd pil Library

You can install from there. For me 1.1.7 worked in Pycharm 5.0.4 in OSX Python 2.7.10. Other alternatives is via CLI or Pillow

enter image description here

or from within pycharm terminal "pip install pillow"

Solution 3:

if you get something like:

Traceback (most recent call last): File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.

or

Traceback (most recent call last): File "", line 1, in File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.py", line 907, in raise RequiredDependencyException(msg) __main__.RequiredDependencyException:

while installing Pillow , then there is some problem with your pip. the version creating this issue are pip 19.xx.xx and Pillow 7.0.0

Solution(worked for me)

For PyCharm:

  1. Go to settings > Project: (your project name) > Project Interpreter.

  2. Double click on pip, check specify version which should be 20.0.2+ and click on "Install Package". This will reinstall pip for you.

  3. Now either search for Pillow in same window and click on install or use python -m pip install Pillow in terminal of PyCharm.

For non PyCharm or Terminal Users:

  1. uninstall pip apt-get remove --purge python-pip

  2. install pip curl https://bootstrap.pypa.io/get-pip.py | sudo python

Post a Comment for "How To Install Modules Correctly In Pycharm?"