Today’s respondent reported the following errors when testing the PIL package in Python:
Reason: Incompatible library version: _imaging.cpython-37m-darwin.so requires version 14.0.0 or later, but libjpeg.9.dylib provides version 12.0.0
By analyzing the error message, we can see that it is caused by the version incompatibility between libraries, because the PIL library is old and only supports python2.7, which may lead to this problem. So we think about how to solve it.
Solution
First, consider reloading the library. The basic environment of this environment is Python 3.7. Therefore, enter the code on the command line, delete the library first, and then reinstall it.
conda uninstall pillow
conda install pillow
Finally, the test re imports the library successfully and outputs the size of the picture
Successfully solve the problem!