Closed AndreusUltimus closed 4 years ago
I am having same issues, roughly around the same time as OP which started when I am updating my conda env. I tried this workaround
conda uninstall pillow --force-remove
pip install pillow
without any success. I used --force-remove
to prevent other libraries dependent on pillow
from being removed.
The pip install workaround worked for me.
I wonder is there anything we can learn from https://github.com/python-pillow/Pillow/blob/master/winbuild/build.py
It looks like the --add-imaging-libs=msvcrt
option is added for VS2015, not sure why that would be needed though.
Also, it looks like the imaging lib from pip doesn't link against tiff and zlib like the conda-forge one does...
i have managed to get around this by installing pillow by
conda uninstall pillow --force-remove
pip install pillow==5.4.1
where I installed 5.4.1
version of pillow by pip
.
I just tried building a custom pillow package with the following modification to bld.bat
:
%PYTHON% -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv --global-option="build_ext" --global-option="--disable-tiff" --global-option="--disable-zlib"
i.e. disabling tiff and zlib support - and it seems to fix this issue.
Does it need both tiff and zlib support disabled or is one of them particularly suspect? Also are there certain versions of tiff (like older ones) that don't have this problem? Would ask the same about zlib, but it hasn't changed in a very long time. Thanks in advance for your help 🙂
On further testing, just downgrading libtiff seems to be enough to fix the issue for me:
>>> conda install libtiff=4.0
The following packages will be DOWNGRADED:
libtiff 4.1.0-h2e92f26_0 --> 4.0.10-h6512ee2_1003
zstd 1.4.3-hd8a0e53_0 --> 1.4.0-hd8a0e53_0
So it seems the problem may be related to the libtiff 4.1.0 package that was released about 9 days ago. However, the first reports of the issue are from at least 23 days ago when the pillow 6.2.1 package was released, so that's a bit confusing...
This issue for zstd looks like it could be the cause:
This issue for zstd looks like it could be the cause:
* [conda-forge/libtiff-feedstock#44](https://github.com/conda-forge/libtiff-feedstock/issues/44) * [conda-forge/zstd-feedstock#36](https://github.com/conda-forge/zstd-feedstock/pull/36)
It was, in fact, because of this very DLL issue with pillow that I ended up creating the issue at conda-forge/libtiff-feedstock#44 (and I did not discover this report until just now!). The strange thing is that this doesn't affect my other PC, but I also found that downgrading libtiff was a viable workaround.
The zstd rebuild fixed it. Closing this. Please re-open if you are still experiencing this issue.
Hello,
I am encountering this issue on Windows when doing a fresh Conda install of MatPlotLib.
For me, the issue can be reproduced with from PIL import Image
.
from PIL import Image
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-b7f01c2f8cfe> in <module>
----> 1 from PIL import Image
~\Miniconda3\envs\017\lib\site-packages\PIL\Image.py in <module>
92 # Also note that Image.core is not a publicly documented interface,
93 # and should be considered private and subject to change.
---> 94 from . import _imaging as core
95
96 if __version__ != getattr(core, "PILLOW_VERSION", None):
ImportError: DLL load failed while importing _imaging: The specified module could not be found.
@bluepotatoes could you please open a new issue and fill in the info requested in the issue template? This issue is over a year old so is likely discussing a different packaging problem than you are seeing today
Issue:
Very simple, fresh conda install of pillow gets a DLL error.
These instructions (from this issue: https://github.com/conda-forge/pillow-feedstock/issues/45) get an error.
This workaround succeeds, but of course creates other problems with environment repackaging.
Environment (
conda list
):Details about
conda
and system (conda info
):