I'm using the Python C API, and numerous times now I've tried using PySys_SetPath() to redirect the interpreter to a path where I've stored all of my scripts. Yet, every time I try it, I get the following error:
Unhandled exception at 0x1e028482 in app.exe: 0xC0000005: Access violation reading location 0x00000004.
I use it in the following syntax: PySys_SetPath("/Python/"). Is that incorrect? Why does it keep crashing? Thanks in advance.
I had the same problem but when I fixed all the \ to / and added a . at the beginning of the path it worked  ie. the path should look sth like that PySys_SetPath("./Python/") or PySys_SetPath("C:/full/path/Python/")
Why won't PySys_SetPath() work?