Search code examples
pythonpippython-imaging-library

Can't install Python Imaging Library "Pillow"


I have tried to install pillow library for my Django project it won't install. I have tried many times there are no specific answer for problem on internet.


First Try

Terminal Input:

(venv) PS C:\Users\Samsung\Desktop\lms-django> pip install pillow

Terminal Output:

Fatal error in launcher: Unable to create process using '"c:\users\samsung\desktop\lms\venv\scripts\python.exe"  "C:\Users\Samsung\Desktop\lms-django\venv\Scripts\pip.exe" install pillow': The system cannot find the file specified.

Second Try:

Terminal Input:

(venv) PS C:\Users\Samsung\Desktop\lms-django> python3 -m pip install

Terminal Output:

The term 'python3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
 a path was included, verify that the path is correct and try again.
At line:1 char:8
+ python3 <<<<  -m pip install
    + CategoryInfo          : ObjectNotFound: (python3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I want to find a way to install the python pillow library.


Solution

  • Both of these Outputs indicate that your virtual-environment is either corrupted or was not initialized properly. So, you can try deleting this environment and recreating another one.

    Also in Windows, use python instead of python3 unless you have another installation of python2.7