For users who are using a Windows machine and a network mapped drive, where the folder is mapped from a drive, e.g.,
H:\\Documents\\R\\win-library\\3.4 to a network location, e.g.,
\\\\samba-xxx/home/<your_home_dir>/Documents/R/win-library/3.4, you may experience the following error:
> library(synapser) Loading required package: PythonEmbedInR Error: package or namespace load failed for ‘PythonEmbedInR’: .onLoad failed in loadNamespace() for 'PythonEmbedInR', details: call: library.dynam.unload("PythonEmbedInR", packageRootDir) error: DLL ‘PythonEmbedInR.dll’ was not loaded Error: package ‘PythonEmbedInR’ could not be loaded
First, verify that is R,
.libPaths() uses the non-Windows reference to the network file share, for example:
> .libPaths()  "\\\\samba-xxx/home/<your_home_dir>/Documents/R/win-library/3.4" "\\\\samba-xxx/home/<your_home_dir>/Documents/R/R-3.4.4/library"
.libPaths to have the Windows-style reference, for example:
> .libPaths("H:\\Documents\\R\\win-library\\3.4") > .libPaths()  "H:/Documents/R/win-library/3.4" "\\\\samba-xxxo/home/<your_home_dir>/Documents/R/R-3.4.4/library"
Now, you should be able to load
synapser without errors.
synapser is not compatible with reticulate, and the two packages cannot be used together in the same R session. synapser is also therefore incompatible with keras and other R packages that use reticulate to interface with Python libraries.
If you use reticulate to execute Python code and later attempt to load synapser, you may see this error:
Error: package or namespace load failed for ‘synapser’: .onLoad failed in loadNamespace() for 'PythonEmbedInR', details: call: value[[3L]](cond) error: ERROR: Missing system dependencies. Please make sure that your machine has the required dependencies listed in the SystemRequirements field of the DESCRIPTION file: https://github.com/Sage-Bionetworks/PythonEmbedInR/blob/master/DESCRIPTION
As a workaround, if you wish to communicate with Synapse in an R session that also uses reticulate, you can use the Synapse Python client through reticulate.