#Cannot install Python Pillow

1 messages · Page 1 of 1 (latest)

keen hedge
#

MSYS Python (mingw-w64-ucrt-x86_64-python) has always been finnicky in my experience - some modules just randomly fail to install, but I've always fixed that by using WSL instead. Anyways, I figured I might as well ask here in case it's a known thing or I'm doing something silly (I don't use python often). Here's what I get trying to install Pillow:

$ pip install Pillow

(attachment since the log is way too long)

The module installed fine in WSL, but not in MSYS. I have no idea why - the logs mentio zlib, but I have zlib:

$ pacman -Qq | grep zlib
mingw-w64-ucrt-x86_64-zlib
zlib
zlib-devel

Any idea why Pillow is failing to install in MSYS Python?

Thanks in advance.

wide sandal
#

you should install mingw-w64-ucrt-x86_64-python-pillow

#

and to use pip you should install pip separately

#

mingw-w64-ucrt-x86_64-python-pip

keen hedge
# wide sandal you should install `mingw-w64-ucrt-x86_64-python-pillow`

thanks - may i ask why it is a separate package? it makes for a confusing experience for someone not experienced with (msys) python simply trying to run existing code with no usage docs, following the straightforward reasoning - i wouldnt think "i am missing a python module, therefore i must install a system package", i would think "i am missing a python module, therefore i must install it from pip, just like any of the other python modules i was missing"

wide sandal
# keen hedge thanks - may i ask why it is a separate package? it makes for a confusing experi...

this is just the way distros do the thing. actually there are many reasons to do that

  • not all wants to use pip, so it's separated
  • some packages require python modules as their dependencies, so we need them to let everyone run the package out-of-box
  • python version is very important, usually you can't use package that is built using python 3.10 with python 3.11 (msys2 doesn't provide old packages)
  • some packages are needed to be patched to become buildable
#

of course we provide not all python modules, only the ones needed for other packages

keen hedge
#

i see, that makes sense - thanks for the explanation

keen hedge
wide sandal
#

and don't forget that you need also to download python-build python-wheel, python-setuptools and python-installer to be sure that you can download packages via pip

wide sandal
keen hedge
#

same versioning reasons i assume?

wide sandal
#

I described that above