ruh
ruh

Reputation: 21

How to install PIL?

I have been trying to install PIL for quite a long time, tried almost everything

C:\Users\RUCHI SHUKLA>py
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> sudo pip install pillow
  File "<stdin>", line 1
    sudo pip install pillow
         ^
SyntaxError: invalid syntax
>>> sudo easy_install pillow
  File "<stdin>", line 1
    sudo easy_install pillow
         ^
SyntaxError: invalid syntax
>>> sudo apt-get install python-PIL
  File "<stdin>", line 1
    sudo apt-get install python-PIL
         ^
SyntaxError: invalid syntax

Please help me to do it correctly, I have already wasted quite a long time :(

Upvotes: 1

Views: 10670

Answers (1)

Anurag
Anurag

Reputation: 3114

It should be like

C:\Users\RUCHI SHUKLA>pip install pillow

I can see you are using python3, use pip3

C:\Users\RUCHI SHUKLA>pip3 install pillow

For better management of python environment I suggest you to use VirtualEnv

Also sudo does not work in Windows

Upvotes: 1

Related Questions