How to install the PIL library in pycharm
4 answers
In PyCharm
, you can install the library using the built-in tool:
File > Settings > Project: *project_name* > Project Interpreter
There you can configure the path to your Python
and install the library from the{[4] list]}
1) Activate the virtual environment (from the folder vk
):
venv\Scripts\activate
2) Set Pillow
:
pip install --upgrade Pillow
The error is that you did not activate the virtual environment, so you installed Pillow
in the C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\site-packages
folder.
The script looks for the module in the C:\Users\User\PycharmProjects\vk\venv\Lib\site-packages
folder, so you need to install it there by activating the environment.
Is the Pillow library installed?
pip install --upgrade wheel
pip install --upgrade Pillow
If you have Windows, then you can use the command line to go to the path where it is located python.exe and do
python.exe -m pip install <пакет>
And everything should catch up, this is in case you don't like the option of installing directly from pycharm