You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could there be an os independent wrapper around things like Py_SetPythonHome? It's not the most rustic of ffi interfaces and the sizes change between windows and linux.
The text was updated successfully, but these errors were encountered:
Sorry for the delayed response here. What would your example use case be for Py_SetPythonHome ? I've never come across a situation where I've needed to change the python library location (virtualenvs?), but that could just be me.
The reason is we are using conda, and therefore python is not in the "standard location". This breaks the python interpreter initialization code, unless you have pythonhome set.
And setting it today requires a bit of platform specific code in the vein of : unsafe { #[cfg(windows)] let raw_ptr = WideCString::from_str(conda_prefix).unwrap().into_raw(); #[cfg(not(windows))] let raw_ptr = WideCString::from_str(conda_prefix).unwrap().into_raw() as *mut i32; pyo3::ffi::Py_SetPythonHome(raw_ptr); };
Could there be an os independent wrapper around things like Py_SetPythonHome? It's not the most rustic of ffi interfaces and the sizes change between windows and linux.
The text was updated successfully, but these errors were encountered: