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

rstudiocloud
reticulate
#1

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!

0 Likes

#2

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

closed #3

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.

0 Likes