What to Install so i resize images on Python

What to Install so i resize images on Python
0

#1

Hi Guys. I want to resize some images using python and i dont know how to go about it. Have checked the internet for suggestion but its not enough. I followed some suggestion and typed $ pip install pillow on terminal but it’s showing this -> Requirement already satisfied (use --upgrade to upgrade): pillow in /Library/Python/2.7/site-packages … what’s confusing at first is my Python IDLE is 3. not 2.(notice 2.7 from the Requirements).

Please can anyone walk me through how to do this in layman terms.


#2

Your PIP version works for 2.7 but not for 3, for 3 you need the corresponding version:

sudo apt-get install python3-pip

Then you can run the pip3 install pillow command and you can then import it!


#3

Thanks, sorry this is coming late.


#4

I’d generally recommend installing libraries via the distribution’s package manager (in this case: apt). This way, you can avoid spending time unnecessarily looking for dependencies and, sometimes, even compiling them.
In this case, you can simply run:
sudo apt-get install python3-pil


#5

thanks, appreciate. Understood


#6

Read and learn about python-virtualenv. I’d go into Detail but im on mobile