Goal
I want to use undaqTools
module via reticulate
in R.
Reproducible example
I first installed python (version 3.10), created a virtual env, and installed all dependencies including undaqTools
:
library(reticulate)
path_to_python <- install_python()
virtualenv_create("undaq_env", python = path_to_python)
py_install(packages = c("scipy", "numpy", "matplotlib", "h5py",
"nose", "sphinx", "numpydoc", "undaqTools",
"dask", "dask[dataframe]", "pyarrow",
"storefact"),
envname = "undaq_env")
Then I activated the virtual environment:
use_virtualenv("undaq_env")
But when I try to import undaqTools
, it throws an error:
undaqtools <- import("undaqTools")
# Error in py_module_import(module, convert = convert) :
# ModuleNotFoundError: No module named 'daq'
You can see that daq
is available though:
How can I fix this issue?