Installing python-tesseract on Ubuntu 15.x - python

I am having problems installing python-tesseract on Ubuntu systems.
I've tried with several versions of Ubuntu systems of 32 bits from 14.04 onwards and I got nothing. I downloaded python-tesseract_0.9-0.5ubuntu2_i386.deb and tried to install it but dependency problems show up, and after installing the needed packages, these problems does not disappear.
How can I install python-tesseract on Ubuntu 14.04 or 15.10? Thanks
Edit: I am developing an optical character recognition application on python, and I need to access to the lot of functions that tesseract TessBaseAPI gives. I found several wrappers of tesseract for python, but python-tesseract (I have understood that is not the same that pytesseract) is the only one that allows access to all functions, and not only to a few. I downloaded a python-tesseract.deb file, but the problems described above arise.

It works installing gdebi-core first, and afterwards installing the .deb package with it, so that gdebi install dependencies for me. I used Ubuntu 14.04.
sudo apt-get install gdebi-core
sudo gdebi python-tesseract_0.9-0.5ubuntu2_i386.deb

tesseract has been available in the "universe" repository since at least 2012, I suggest you install the tesseract-ocr package with apt-get. Test to make sure the tesseract command is working.
Then if the deb isn't working for you, do a pip install. Be sure to carefully follow the instructions in the pypi package

Related

How do I install python third party libs on the m1 chip?

The Mac Book Air M1 chip doesn't seem to support pep517 according to the errors of installing third-party libraries with pip or brew. Even using these methods without pep517 downloading the library locally didn't work. How does one circumvent this?
Error from using pip install pandas:
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I've tried this:
pip install <lib>
installing the library locally and trying to install with pip without pep517
brew install <lib>
openblas installation of lib
python env on the intel venv
I had the exact same problem, with a different library but with the same error code for PEP 517, I was using python 3.9 at the time, I checked the docs and found out that it's a problem with the python version for the library, downgraded to Python 3.6 and voila! it worked.
Basically try downgrading to Python 3.6 and check.
Installing python libraries through Anaconda seems to work. I simply downloaded the installer and could later use the libraries globally. If someone has a better in-depth explanation, feel free to comment.
I was having the same message when trying to install a different package. I solved by removing the CommandLineTools and installing it again. The steps were:
sudo rm -r /Library/Developer/CommandLineTools
wait for command prompt...
xcode-select --install
This solved the issue for me.

Debian multiarch: unable to install python for both armhf and amd64

For a project I am working on I am using Debian (8) as base OS. The target I am developing for is an ARM based platform. So for easy cross compiling I am using the multiarch functionality that debian provides.
Unfortunately I run into an issue when I try to install python for both my host system and the system I am cross compiling for. It looks like they cannot be installed next to each other.
When I try to install python for both architectures using apt-get install (apt-get install python python:armhf), I get this error:
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed
PreDepends: python-minimal (= 2.7.9-1) but it is not going to be installed
Conflicts: python:armhf but 2.7.9-1 is to be installed
python:armhf : Conflicts: python but 2.7.9-1 is to be installed
If I first install python for my host system and then try to install python for armhf, apt wants to remove the first python installation again.
Anybody seen this before? Any idea how to solve this?
Multiarch as of Debian Jessie does not allow the parallel installation of executables:
The package python contains executables that are installed to /usr/bin (e.g. pdb, pydoc, ...)
The package python:armhf also contains those executables and they should also get installed to /usr/bin.
Therefore python and python:armhf can not be installed at the same time since the executables of one package would overwrite the executable of the other package.
The good thing is, that you do not need two python interpreters. In your case I would just install the python interpreter that is needed for the host architecture (e.g. python:amd64). Please note that the installation of build dependencies with a command such as sudo apt-get build-dep -a armhf PACKAGE-NAME might sometimes fail and you have to guess what packages need to be installed manually.

Having troubles installing GDAL for Python

I am still pretty new to python, and I was wondering if anyone has had this problem before. I have read other threads, but I haven't seen this problem addressed yet. I need to install the GDAL module for python, and I have seen threads saying you need to install GDAL first and then it can be used on python, but I have also see others that said that conda install GDAL is enough. When I try the latter, I get this error. Any ideas?
I had the same problem two days ago trying to install GDAL on Debian Jessie.
The solution was using pygdal python package from PyPi.
Just read the instructions at PyPi and follow them, they are a bit different then one expects. In general:
install required dependencies into your system (e.g. using apt-get install libgdal1-dev
check, what version of GDAL is installed
use pip to install pygdal with a version matching the installed GDAL lib.
The last step is a bit unusual, but does the trick.
This works for Linux. For Windows my colleagues claim, there are ready made binaries, which can be installed.

SDAPS installation on XAMPP?

I need to install SDAPS, an Open Source OMR program, see here http://sdaps.org/SDAPS. It uses LaTeX and Python.
I have no idea if I can install it on XAMPP? Or do I need a Linux OS distribution?
They write here: http://sdaps.org/Documentation/Dependencies about the Dependencies. How can I install those dependencies?
Thanks.
If you are working on Debian Linux is as easy as sudo apt-get install sdaps. If you had read the SDAPS download site you would have known that:
Windows
There is no windows version for SDAPS. In theory it should be possible
to get it running, but getting all the dependencies to work will be a
big task.
It is likely much simpler to install a GNU/Linux distribution on the
computer or inside a virtual machine.

What version of python can I use with Twisted/Zope?

I noticed that Twisted has a dependency on Zope. I found that when I tried to install Zope, after running, ./configure it tells me I need to use python2.4 (not python 2.5+ which I would like to be using).
However, I have seen some tutorials and guides that suggested using python 2.5 for Twisted. So I'm just generally confused. Has anyone set this up and ran some of the twsited web examples that use zope? What version of python did you use? Was there an installation guide you followed somewhere?
Twisted doesn't have a dependency on full zope. It's just zope.interface, which is a small pure-python module packaged separately from all zope.
You can download the .tar.gz version and run the usual python setup.py install, that should work. Or if your operational system includes a package management system, you could check it for a easy-to-install package. Example, in debian/ubuntu you could do:
apt-get install python-zopeinterface
or even
apt-get install python-twisted
directly.
If you install twisted with pip install or easy_install it will download and install zope.install for you as well.

Categories

Resources