Hi On my side unreal engine gives error that cannaot open python312.lib I have added paths in directories, build.cs and also set environment variables but error still continue to appear even when i run pybind this error appears
Hi, I was able to reproduce the error. Try adding the path to the .lib file like this: "PublicAdditionalLibraries.Add("D:\\Software\\Python\\libs\\python312.lib");" to your build.cs file.
Nice video. Will the users who install the final packaged game need to install python also? I'm curious how additional python packages can be installed also. I'm checking the cpython docs, but interested to know if you've tried this.
Hi, that's a neat question. Even I didn't bother to go this far with CPython and I'm not sure how that would work either😅. But my guesses are since CPython and PyBind both use the Python interpreter, the end user will have to have Python installed. But it seems you can embed Python with your application as you ship it (a good example would be how Blender ships with a Python interpreter). As for the installing of libraries, you still have to run it through the console 'pip install' but you can do it all inside the C script: py::module sys = py::module::import("sys"); py::module subprocess = py::module::import("subprocess"); // Execute the pip install command subprocess.attr("run")("pip install numpy", py::arg("shell")=true); --> [opens a console and writes code pretty much. You could technically call an exe with the same code.] The above is from GPT, so do double-check. As I mentioned in the video, what I covered was not even scratching the surface. Embedding stuff is pretty hardcore stuff, haha.
Hi On my side unreal engine gives error that cannaot open python312.lib I have added paths in directories, build.cs and also set environment variables but error still continue to appear even when i run pybind this error appears
Hi
On my side unreal engine gives error that cannaot open python312.lib
I have added paths in directories, build.cs and also set environment variables but error still continue to appear even when i run pybind this error appears
Hi, I was able to reproduce the error. Try adding the path to the .lib file like this: "PublicAdditionalLibraries.Add("D:\\Software\\Python\\libs\\python312.lib");" to your build.cs file.
Nice video. Will the users who install the final packaged game need to install python also? I'm curious how additional python packages can be installed also. I'm checking the cpython docs, but interested to know if you've tried this.
Hi, that's a neat question. Even I didn't bother to go this far with CPython and I'm not sure how that would work either😅. But my guesses are since CPython and PyBind both use the Python interpreter, the end user will have to have Python installed. But it seems you can embed Python with your application as you ship it (a good example would be how Blender ships with a Python interpreter).
As for the installing of libraries, you still have to run it through the console 'pip install' but you can do it all inside the C script:
py::module sys = py::module::import("sys");
py::module subprocess = py::module::import("subprocess");
// Execute the pip install command
subprocess.attr("run")("pip install numpy", py::arg("shell")=true); --> [opens a console and writes code pretty much. You could technically call an exe with the same code.]
The above is from GPT, so do double-check. As I mentioned in the video, what I covered was not even scratching the surface. Embedding stuff is pretty hardcore stuff, haha.
Hi
On my side unreal engine gives error that cannaot open python312.lib
I have added paths in directories, build.cs and also set environment variables but error still continue to appear even when i run pybind this error appears