fbertola / bgfx-python

Python 3.7+ wrapper for the BGFX library. 🐍
BSD 2-Clause "Simplified" License
123 stars 6 forks source link

Missing importlib resources on a fresh venv #12

Closed meuns closed 4 years ago

meuns commented 4 years ago

Hi,

I tried the last wheel (1.0.4) and run an example application.

/home/sylvain/Documents/Blackboard/venv/bin/python /home/sylvain/Documents/Blackboard/00.py
Traceback (most recent call last):
  File "/home/sylvain/Documents/Blackboard/venv/lib/python3.6/site-packages/bgfx/utils.py", line 26, in <module>
    import importlib.resources as pkg_resources
ModuleNotFoundError: No module named 'importlib.resources'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sylvain/Documents/Blackboard/00.py", line 9, in <module>
    from bgfx import bgfx, ImGuiExtra, as_void_ptr
  File "/home/sylvain/Documents/Blackboard/venv/lib/python3.6/site-packages/bgfx/__init__.py", line 2, in <module>
    from .utils import *
  File "/home/sylvain/Documents/Blackboard/venv/lib/python3.6/site-packages/bgfx/utils.py", line 29, in <module>
    import importlib_resources as pkg_resources
ModuleNotFoundError: No module named 'importlib_resources'

Not sure if a dependency is missing for the wheel or if my version of python isn't supported.

Regards

meuns commented 4 years ago

I use python 3.6 within a venv on Ubuntu 18.04 (with all updates).

fbertola commented 4 years ago

Hi @meuns, yes you need to install importlib-resources. Python 3.6 is supported and it's strange because that dependency should automatically be installed by other packages. I will add it explicitly, thanks!

meuns commented 4 years ago

Hi @fbertola, I can run examples without much any problem now. Thanks