State:Closed|icon_bug|icon_nuke|database:public|Resolution:Fixed|TargetRelease:14.0v6|BugID:543070|
Problem summary
Importing Nuke as module in external Python install no longer works
Python errors saying:
ImportError: DLL load failed while importing _nuke: The specified module could not be found.
Customer reported version
nuke.n/a
Customer reported platform
Steps to reproduce
1) Install Python 3.9.10: https://www.python.org/downloads/release/python-3910/
2) Open the Python install directory in a Command Prompt
3) Set the following environment variables in that Command Prompt :
set NUKE_INTERACTIVE=1set PATH=C:\Program Files\Nuke14.0v4\set PYTHONPATH=C:\Program Files\Nuke14.0v4\lib\site-packages\ import nuke [localpete@fwp782050 ~]$ cd /workspace/shared/Python-3.9.10/[localpete@fwp782050 Python-3.9.10]$ export NUKE_INTERACTIVE=1[localpete@fwp782050 Python-3.9.10]$ export PATH=/usr/local/Nuke14.0v4/:$PATH[localpete@fwp782050 Python-3.9.10]$ export PYTHONPATH=/usr/local/Nuke14.0v4/lib/python3.9/site-packages/[localpete@fwp782050 Python-3.9.10]$ ./pythonPython 3.9.10 (main, May 25 2023, 14:59:26) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import nukeLicence expires on: <DATE> C:\Python39>set NUKE_INTERACTIVE=1C:\Python39>set PATH=C:\Program Files\Nuke14.0v4\C:\Python39>set PYTHONPATH=C:\Program Files\Nuke14.0v4\lib\site-packages\C:\Python39>python.exePython 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import nukeTraceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\Nuke14.0v4\lib\site-packages\nuke.py", line 7, in <module> import _nukeImportError: DLL load failed while importing _nuke: The specified module could not be found.>>> We're sorry to hear that
Please tell us why