Issue
Is there a way to check pytesseract version in python?
According to PyPi documentation of pytesseract, there is a built-in function get_tesseract_version
to get pytesseract version. But when I run it in python, I get the following:
>>> import pytesseract
>>> pytesseract.get_tesseract_version
<function get_tesseract_version at 0x7f4b9edd4598>
>>> print(pytesseract.get_tesseract_version)
<function get_tesseract_version at 0x7f4b9edd4598>
I know that I can get pytesseract version using pip freeze
, but I want to get it using python. Is that possible?
Solution
You need to call the function – pytesseract.get_tesseract_version()
– but that will get you the underlying Tesseract version, not the version of pytesseract
in use.
Since pytesseract
doesn't unfortunately expose the standard __version__
variable, you can use the pkg_resources
API to introspect the current package environment:
>>> import pkg_resources
>>> pkg_resources.working_set.by_key['pytesseract'].version
'0.3.0'
Answered By - AKX
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.