Stuck trying to run basic example in c++

Hello everyone,

By following the instructions at [url]AssertionError: has_mat() at line 555 of c:\temp\mkpr\panda3] I’ve finally managed to get the newest git repo built on vs 2015 on win 10 with the third party package that was supplied for it.

I can build and link against the libraries but I can’t seem to get my executable to run.

The executable is a the simple hello world program from te tutorial page.

They python examples seem to run fine; but when I try to load my c++ application i get the following error message:

“Fatal Python error: Py_Initialize: unable to load the file system codec
Unhandled exception at 0x00007FFFFD6498FE (ucrtbase.dll) in ConsoleApplication1.exe: Fatal program exit requested.”

I’ve tried a number of different solutions but none of them has worked for me;

I’m at a total loss at this point and any help would be greatly appreciated.

So far I’ve tried the following:

removing my existing installation of Python 2.7 from the system path
adding the python 3.5 installation that came with panda3d to the syatem path
Checking to make sure PYTHONPATH isn’t set to point to the old python installation(it wasn’t set at all)
setting PYTHONPATH to point to the new installation

I also ran tasklist /m to ensure that my application was indeed loading the dll for the correct version of Python.

None of these things has worked for me so far.

Edit again:
I’ve now completely uninstalled Python 2.7 in hopes that it might resolve the issue but no luck.


Welcome to the forums, and sorry to hear about your troubles.

I would suggest updating to the latest version of the Panda3D repository. I have now changed it so that Python is never initialized for C++ users, so you no longer need to add the Python include path or link with Python or pystub.

Awesome!!! That seems to have fixed it! Thank you so much!