io_pdx_mesh icon indicating copy to clipboard operation
io_pdx_mesh copied to clipboard

No module named 'imp' (Blender)

Open geopic opened this issue 1 year ago • 3 comments

Describe the bug Clicking on the checkbox to enable the plugin brings up a message to state that no module named 'imp' is available.

To Reproduce

  1. Download recent release blender-io_pdx_mesh.zip (release 0.91)
  2. Do usual 'install from disk' from Blender preferences
  3. IO PDX Mesh will be greyed out. When clicking on checkbox, it will show the error message.

Software (please complete the following information): Arch Linux, Blender 4.2.1 LTS

Additional context N/A

Screenshots Screenshot_20241001_013608

geopic avatar Oct 01 '24 00:10 geopic

Officially Blender 4.2.1 runs with Python 3.11, except on Linux I think it uses the systems Python install instead of bundling one with Blender.

The imp module was removed in Python 3.12.

I can definitely fix this, but I'd be interested to know if I'm right about your setup - do you have Python 3.12 installed and does Blender use it? (you can open the Python console in Blender to verify that)

ross-g avatar Oct 01 '24 21:10 ross-g

Hi Ross, thanks for your quick response. I literally switched to Windows 11 just yesterday so my Arch Linux installation is gone now, which makes things a bit awkward as I can't fully confirm for sure what my system Python version is! However I am 99% sure it was 3.12.* as I did install it via the main Arch repos when I set up the system earlier this year.

geopic avatar Oct 02 '24 11:10 geopic

No problem! Thanks for getting back to me.

ross-g avatar Oct 02 '24 19:10 ross-g

I seem to be running into the same error

Nobara Linux 41 Blender 4.3.2

The version of python that I have is 3.13.2 Image

The24thDS avatar Mar 31 '25 15:03 The24thDS

by modifying the __init__.py by replacing from imp import reload to from importlib import reload, it work, I think just make a basic check for python 3.12 or supperior can be done to fix it

coco875 avatar Oct 12 '25 22:10 coco875

(I just follow https://docs.python.org/3/whatsnew/3.12.html#whatsnew312-removed-imp)

coco875 avatar Oct 12 '25 22:10 coco875