0
$\begingroup$

When importing PyQt5 blender throws this:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.error.

I have double checked several times to ensure that everything is on 64 bit(OS, Blender and Python in blender).

I attempted to settle for Tkinter however that gives this error:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "D:\blender-2.80\2.80\python\lib\tkinter\__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Has anyone else encountered these issues and had any success creating an external gui for blender?

$\endgroup$
2
$\begingroup$

Both are intentionally disabled since they may cause problems with Blender in certain situations (don't ask what situations, because I haven't run into an issue yet). You can install Anaconda on your system and then delete the contents of the "python" directory in your Blender install directory. And replace it with the contents of the "C:\Anaconda3\envs\py3" folder. This completely replaces the python version that runs Blender, so be careful to download the correct version that is compatible with your version of Blender:

  • Python 3.6 for Blender 2.79

  • Python 3.7 for Blender 2.80

You may still need to install TK and PyQT separately (I can't remember what is included with Anaconda), but they should work now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.