0

Hello I seem to be having trouble importing opencv on my deployed flask app on Heroku!

I've referred to similar posts such as this this "ImportError: libSM.so.6: cannot open shared object file: No such file or directory " but can't seem to figure out the next steps on windows.

This is what I've done so far:
1. gone to Heroku -> App -> Settings -> Buildpacks -> added Python buildpack
2. Added a Aptfile.txt to my directory with the following packages on each line (read this somewhere not sure if it makes any sense)

libsm6 , libxrender1 ,libfontconfig1, libice6

Notes:

  • My openCV version-- opencv-python==3.4.3.18
  • I'm on windows so the sudo commands recommended in the other post answers dont work

Thanks in advance!

2 Answers 2

8

Use opencv-python-headless it's out of libSM6 dependency.

pip install opencv-python-headless
Sign up to request clarification or add additional context in comments.

Comments

3

put this line in requirments.txt

opencv-python-headless==4.2.0.32

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.