(Pardon my ignorance of both Python and C++, but...)
I installed reticulate on a Raspberry Pi (raspbian distro -- a debian variant) and when attempting to import I get the following:
> picamera <- import("picamera")
Error in py_initialize(config$python, config$libpython, config$pythonhome, :
PyUnicodeUCS2_FromString - /usr/lib/python2.7/config-arm-linux-gnueabihf/libpython2.7.so: undefined symbol: PyUnicodeUCS2_FromString
It seems that the Python 2.7 that comes on this distro is compiled to use 4 byte unicode characters (UCS4, rather than UCS2)
When altering the constant in libpython.cpp (https://github.com/rstudio/reticulate/compare/master...trestletech:master) I'm then able to import successfully.
Good catch! I think there's a way to work around this by calling the Python unicode function rather than the (apparently platform-dependent) C API.
Most helpful comment
Good catch! I think there's a way to work around this by calling the Python
unicodefunction rather than the (apparently platform-dependent) C API.