Issue when importing opencv-python library with reticulate in RStudio Cloud

I am having issue when importing opencv-python library with reticulate in RStudio Cloud.
I installed opencv-python without problem with reticulate but I can't load it.

cv <- import("opencv-python")
Error in py_module_import(module, convert = convert) : 
  ImportError: No module named opencv-python

Here is the link:
RStudioCloud Project

Any help is appreciated.
Thanks in advance!

This is one of the things I don't like about python, very often the package name for installation is not the same as the module name for importing, in this case you should use

library(reticulate)
cv <- import("cv2")

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.