P3D Module Builder "FileNotFoundError"

Hi all,

This is a basic issue, apologies in advance. I’m about to start experimenting with mixing C++ and Python and looked into the P3DModule builder. In trying to get the “example.h” file to run upon following the instructions given, I get the following error:

Traceback (most recent call last):
  File "build.py", line 51, in <module>
    run_cmake(config, args)
  File "C:\Panda3D-1.10.10-x64\P3DModuleBuilder-master\P3DModuleBuilder-master\scripts\setup.py", line 153, in run_cmake
    output = try_execute("cmake", join_abs(get_script_dir(), ".."), *cmake_args, error_formatter=handle_cmake_error)
  File "C:\Panda3D-1.10.10-x64\P3DModuleBuilder-master\P3DModuleBuilder-master\scripts\common.py", line 260, in try_execute
    process = subprocess.Popen(args, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "C:\Panda3D-1.10.10-x64\python\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "C:\Panda3D-1.10.10-x64\python\lib\subprocess.py", line 1207, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

I’m not sure what specified file cannot be found. Could someone point me in the right direction?


You’d better follow the official tool for this.

Simple steps for this, it worked for me in Windows.

1 step:

D:\Panda3D-1.10.10-x64\bin\interrogate.exe -module test -oc test_igate.cxx -od test.in -python-native example.h

out: test.in test_igate.cxx

2 step:

D:\Panda3D-1.10.10-x64\bin\interrogate_module.exe -module test -library test -oc test_module.cxx -python-native test.in

out: test_module.cxx

3 step:

cl /LD /EHsc /MD /DLL /ID:/Panda3D-1.10.10-x64/include /ID:/Panda3D-1.10.10-x64/python/Include test_module.cxx /link /libpath:D:/Panda3D-1.10.10-x64/python/libs /libpath:D:/Panda3D-1.10.10-x64/lib  /out:test.pyd ^

python37.lib ^
libp3dtool.lib ^
libp3dtoolconfig.lib ^

The error indicates you don’t have CMake installed.

Alright, though the reason I’m currently attracted to the P3D Module Builder is how easy it seems to use, as compared to what you’re suggesting. Please understand this is my first time looking into mixing C++ and Python in Panda3d, so I may not be fully familiar with which would be better to go with, which is why I’m first interested in testing the waters with P3DMB. To use it, I followed the instructions here, 100% to the letter:

Thanks! Turns out I installed it without including the PATH option, hence the issue. It now works very well after installing it with the PATH option.