(May-10-2019, 01:27 PM)MrMajorThorburn Wrote: I have re-installed python and confirm I have a PYTHONPATH environment variable containing the paths to the installed python DLLs and Lib folders.Look as this to make sure all is correct Python 3.6/3.7 and pip installation under Windows
A basic test of
python
and pip
from command line.C:\>python -V Python 3.7.3 C:\>python -c "import sys; print(sys.executable)" C:\python37\python.exe # See that pip point to 3.7 C:\>pip -V pip 19.1.1 from c:\python37\lib\site-packages\pip (python 3.7)So now will
pip install Pillow
only install to Python 3.7.A quick test i use virtual environment as a already have Pillow installed before.
# Install (key_env) E:\div_code\key_env λ pip install Pillow Collecting Pillow ..... Installing collected packages: Pillow Successfully installed Pillow-6.0.0 # Test (key_env) E:\div_code\key_env λ python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. # The import is still PIL as mention before >>> from PIL import Image >>> Image.__version__ '6.0.0' >>> im = Image.open("22.jpg") >>> print(im.format, im.size, im.mode) JPEG (930, 288) RGB >>> exit()