0

I am currently working on a Nvidia Jetson Nano. When I installed JetPack 4.4, OpenCV 4.1.1 was included inside and when I was running on my Nano's Python shell, I was able to at least run import cv2 and a few other functions without errors. However, when I was running one of my scripts, I kept encountering this certain error and I thought it was an issue with my OpenCV. This is because the tutorial that I was following, they mentioned that if ran cv2.getBuildInformation() it should include details of CUDA. At the time, my output did not contain CUDA so I thought something was wrong.

Then, I've decided to reinstall OpenCV not thinking too much about it by following several tutorials, mainly the one by blogger Piggybank here. I did not uninstall anything as I thought that it would just simply overwrite it. However, the installation did not go through because it mentioned that my disk was running low on memory. I though that the entire operation would be aborted but apparently not. When I try to run import cv2 it gives me:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

I tried to 'completely uninstall' OpenCV via pip and apt-get after but the commands returned saying that OpenCV does not exist. Not too sure what went wrong here and I don't understand I was able to run OpenCV smoothly before but now, I don't have enough memory for it. When I try to reinstall with the blog link above, it only reaches to about 50% of the entire installation process. Please help.

Goh Jia Yi
  • 329
  • 3
  • 16
  • You are trying to install opencv before uninstalling the previous one? – Yunus Temurlenk May 26 '20 at 16:40
  • It might just be easier to reflash your SD card and this time uninstall it first. If you don't have too much to transfer it shouldn't be too much work. Easier than trying to figure out how to fix your issue. Although, you might need a bigger SD card either way. Or you may have to look at cross-compilation – Warpstar22 May 26 '20 at 20:11
  • @YunusTemurlenk Yes, not a very good idea but I went ahead with it.. – Goh Jia Yi May 27 '20 at 02:13
  • @Warpstar22 I agree that I need a bigger SD card because I wasn't able to run some stuff with the limited memory. I have an issue with reading my SD card here, if you have any input I would appreciate it!! https://forums.developer.nvidia.com/t/unable-to-detect-sd-card-after-writing-file-using-balenaetcher/124920 – Goh Jia Yi May 27 '20 at 02:13
  • It is not a solution uninstalling it in this step cos the background is so messy now. Just remove all files consisting opencv. Check [here](https://stackoverflow.com/questions/9276169/removing-all-installed-opencv-libs) – Yunus Temurlenk May 27 '20 at 05:45
  • Thanks all, I've decided to reflash my SD card since OpenCV is built in the Jetpack. It took me lesser time. – Goh Jia Yi May 28 '20 at 02:48

0 Answers0