question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PIL (pillow) loading fails with pkg_resources error

See original GitHub issue

Versions

  • Python : 3.8
  • MacOS version : 10.15.5
  • XCode Version : 11.2.1
  • Cython version : 0.28.1

Describe the bug When running the program, the loading fails with a missing module error dispalyed in the console.

   File "/Users/richard/Library/Developer/CoreSimulator/Devices/E5F90713-0057-4F0B-A728-F6F27038B40F/data/Containers/Bundle/Application/8522E39B-C6F1-441E-B036-71CAF7A37FCE/btp-kivy-app.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-10.15-x86_64.egg/PIL/_imaging.py", line 3, in __bootstrap__
 ModuleNotFoundError: No module named 'pkg_resources'
2020-07-15 20:05:34.507524+0200 btp-kivy-app[47771:3173351] Application quit abnormally!

To Reproduce toolchain build pillow

Logs

[INFO   ] [Audio       ] Providers: audio_sdl2 (audio_avplayer, audio_ffpyplayer ignored)
 Traceback (most recent call last):
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/main.py", line 6, in <module>
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/controller.py", line 6, in <module>
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/lib/CPData/lifestory/game.py", line 25, in <module>
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/lib/CPData/lifestory/lsmanager.py", line 4, in <module>
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/lib/CPData/lifestory/lsicon.py", line 6, in <module>
   File "/Users/richard/Repos/btp/kivy-ios/btp-kivy-app-ios/YourApp/lib/CPData/game/exifrotation.py", line 15, in <module>
   File "<frozen zipimport>", line 259, in load_module
   File "/Users/richard/Library/Developer/CoreSimulator/Devices/E5F90713-0057-4F0B-A728-F6F27038B40F/data/Containers/Bundle/Application/8522E39B-C6F1-441E-B036-71CAF7A37FCE/btp-kivy-app.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-10.15-x86_64.egg/PIL/Image.py", line 95, in <module>
   File "<frozen zipimport>", line 259, in load_module
   File "/Users/richard/Library/Developer/CoreSimulator/Devices/E5F90713-0057-4F0B-A728-F6F27038B40F/data/Containers/Bundle/Application/8522E39B-C6F1-441E-B036-71CAF7A37FCE/btp-kivy-app.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-10.15-x86_64.egg/PIL/_imaging.py", line 7, in <module>
   File "/Users/richard/Library/Developer/CoreSimulator/Devices/E5F90713-0057-4F0B-A728-F6F27038B40F/data/Containers/Bundle/Application/8522E39B-C6F1-441E-B036-71CAF7A37FCE/btp-kivy-app.app/lib/python3.8/site-packages/Pillow-6.1.0-py3.8-macosx-10.15-x86_64.egg/PIL/_imaging.py", line 3, in __bootstrap__
 ModuleNotFoundError: No module named 'pkg_resources'
2020-07-15 20:05:34.507524+0200 btp-kivy-app[47771:3173351] Application quit abnormally!
2020-07-15 20:05:34.544800+0200 btp-kivy-app[47771:3173351] Leaving

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
misl6commented, Jul 18, 2020

@Zen-CODE I’ve rebuilt kivy-ios==master twice on my setup and pip3 it’s available. Can you also try to rebuild from scratch and capture the logs for further investigation?

1reaction
AndreMirascommented, Jul 16, 2020

I think adding setuptools to python_depends should be enough as setuptools ships pkg_resources. Let’s give that a try

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named pkg_resources - python - Stack Overflow
This error message is caused by a missing/broken Python setuptools package. Per Matt M.'s comment and setuptools issue #581, the bootstrap script referred ......
Read more >
Pillow 2.2.1 - PyPI
Or easy_install (for installing Python Eggs, as pip does not support them): $ easy_install Pillow ... Fail on all import errors, fixes #298....
Read more >
Installation - Pillow (PIL Fork) 9.3.0 documentation
Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL. Warning. Pillow >= 1.0 no longer supports import ......
Read more >
Error importing '_imaging' from PIL when trying to use ...
Hi, This sounds like a problem in the PIL/Pillow libraries, so it's not directly related to ML-Agents. You might try some of ...
Read more >
I am trying to install PIL module But I end up with an error
Try installing the package named Pillow, it's a PIL Fork. You can use it the same as the PIL package. commented Apr 6,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found