I want to install a deb package that depends on python 3.4, which I have, however the installer thinks I only have 3.2 since that's apt-cache says, and dpkg-query returns python3 3.2.3-0ubuntu1.2. update-alternatives didn't seem to cut it. What can I do?

  • Could you please add the ouput of dpkg-query -W python3 to your question and tag it with the release you're running (e.g 12.04 or 14.04) – Sylvain Pineau Jul 2 '14 at 9:50
  • When it comes to Python problems you must listen to @SylvainPineau – user284234 Jul 2 '14 at 12:14
  • @SylvainPineau, python3 is python3.2, but I have separate packages for python3.3 and python3.4. – Emre Jul 3 '14 at 1:02
  • deb packages or did you install 3.4 from sources? – Sylvain Pineau Jul 3 '14 at 6:29
  • @SylvainPineau: All the python packages are from apt-get. The one that depends on them is a deb. – Emre Jul 3 '14 at 6:32

Having a python3.4 package available in 12.04 won't be your only problem.

Look at the Debian control file:

Package: python3-tesseract
Source: python-tesseract
Version: 0.9-0.4ubuntu0
Architecture: amd64
Maintainer: FreeToGo <FreeToGo@gmail.com>
Installed-Size: 4261
Depends: python3 (>= 3.4~), python3 (<< 3.5), libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), liblept4, libstdc++6 (>= 4.1.1), libtesseract3
Section: python
Priority: optional
Homepage: http://code.google.com/p/python-tesseract/
Description: Tesseract for Python3
 Python-tesseract is a wrapper class for Tesseract OCR
 that allows any conventional image files (JPG, GIF, PNG,
 TIFF and etc) to be read and decoded into readable
 languages. No temporary file will be created during the
 OCR processing.

python3-tesseract (and python-tesseract) depends on liblept4 which is only available in 14.04+.

My recommendation would be to set up a 14.04 VM or upgrade your system to 14.04 to properly install python3-tesseract.

  • Thanks, but I've already installed liblept4. I tried editing this control file and repackaging the deb file too, to no avail. I wanted to keep the question more general, though, to see if it was possible to deal with such problems. I guess you're saying no, or it's not worth the effort. – Emre Jul 3 '14 at 8:03
  • If you succeeded in installing (manually) the missing dep, then you could try to install the deb file using dpkg --force-depends -i filename.deb – Sylvain Pineau Jul 3 '14 at 8:13
  • If this last command worked could you please up vote the answer too? Thanks – Sylvain Pineau Jul 3 '14 at 9:40
  • Sorry, it failed with py3compile: Requested versions are not installed. I couldn't locate the second dependency check. Thank you for your time. – Emre Jul 3 '14 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.