Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. help with pip installing opencv

help with pip installing opencv

Scheduled Pinned Locked Moved Ask your questions right here!
2 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Syed OmairS Offline
    Syed OmairS Offline
    Syed Omair
    wrote on last edited by
    #1

    hello,

    i am trying to run this command in my m500 drone "pip3 install opencv-python" inside the provided ubuntu docker container from modal ai. i was able to simply do a pip3 install numpy and pip3 install pandas. but pip3 -v install opencv-python is becoming a very lengthy process taking almost 3 hours before failing with an error. i can understand from the debugger output that it is building the library somehow.

    "ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly"

    no matter what I try it won't install. is there an easy solution to get opencv working in the docker container ? i am working with is python 3.5.2 and pip 20.3.4

    i consulted this stackoverflow question for solutions

    Link Preview Image
    ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

    I was trying to install OpenCV4 in a docker on jetson nano. It has jetpack 4.4 s os. The docker was successfully created and Tensorflow is running but while installing OpenCV using pip it is showing

    favicon

    Stack Overflow (stackoverflow.com)

    thank you,
    omair

    Alex KushleyevA 1 Reply Last reply
    0
    • Syed OmairS Syed Omair

      hello,

      i am trying to run this command in my m500 drone "pip3 install opencv-python" inside the provided ubuntu docker container from modal ai. i was able to simply do a pip3 install numpy and pip3 install pandas. but pip3 -v install opencv-python is becoming a very lengthy process taking almost 3 hours before failing with an error. i can understand from the debugger output that it is building the library somehow.

      "ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly"

      no matter what I try it won't install. is there an easy solution to get opencv working in the docker container ? i am working with is python 3.5.2 and pip 20.3.4

      i consulted this stackoverflow question for solutions

      Link Preview Image
      ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

      I was trying to install OpenCV4 in a docker on jetson nano. It has jetpack 4.4 s os. The docker was successfully created and Tensorflow is running but while installing OpenCV using pip it is showing

      favicon

      Stack Overflow (stackoverflow.com)

      thank you,
      omair

      Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by Alex Kushleyev
      #2

      @Syed-Omair , I suggest that you try building opencv from source - the way we do it is shown here : https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-opencv/-/tree/add-python3-bindings/ -- this is a specific branch that enables python3 bindings.

      I actually have pre-build deb for this here. This was built and tested for VOXL2, but it should work on VOXL1 in a 64-bit ubuntu docker image. Just before installing the deb, please create the following directory:

      mkdir -p /usr/lib/python3.6/dist-packages/
      

      this is the place where cv2.so will be copied for python to use. I fixed this on the branch but the deb was built some time ago and does not have this fix, so it will fail during install unless you create this folder.

      You should remove (or just don't install) other opencv packages before you install this one.

      Please try it out and let me know if it works for you. Also, if you want to build it yourself, you can see build.sh for build flags, etc. This is a somewhat stripped down version opencv. Building all of the components would indeed take hours on voxl.

      EDIT: the deb i provided may or may not work on VOXL1. The way it was built was actually on an ARM-based Mac inside a ubuntu arm docker, using native compiler flags. So i am not sure if it is compatible with armv8 or needs newer arch. However, you should give it a try. if the deb does not work for you, you can just try building this right on your VOXL1 inside docker using build.sh native option.

      Alex

      1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev referenced this topic on

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      ModalAI
      Categories Recent Tags ModalAI.com Docs
      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups