Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'cv2.cv2' has no attribute 'freetype' with opencv-contrib-python #243

Closed
SIRHAMY opened this issue Sep 2, 2019 · 1 comment

Comments

@SIRHAMY
Copy link

SIRHAMY commented Sep 2, 2019

Expected behaviour

I'm trying to use cv2 with freetype and all the documentation basically says that you just need to pip install opencv-contrib-python in order to get this to work. But it throws an AttributeError on this line: free_type = cv2.freetype.createFreeType2()

Actual behaviour

AttributeError when trying to access freetype

Steps to reproduce

  • Create a new python file
  • create a new conda env
  • pip install opencv-contrib-python
import cv2

free_type = cv2.freetype.createFreeType2()
  • operating system: Ubuntu
  • opencv-python version: opencv-contrib-python==4.1.1.26
@skvark
Copy link
Member

skvark commented Sep 2, 2019

The pre-built wheels provided by this repository have not been compiled with Freetype. You can check the supported 3rd party dependencies by running cv2.getBuildInformation().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants