I am having trouble installing python-tesseract on my linux system. I've been using this tutorial:
http://delimitry.blogspot.be/2014/10/installing-tesseract-for-python-on.html
The error I get is:
File does not exist:['/usr/include/tesseract/capi.h', '/usr/local/include/tesseract/capi.h', '/opt/include/tesseract/capi.h', '/opt/local/include/tesseract/capi.h']
root#opencv:/home/philipp/python-tesseract#
When running python setup.py clean in /python-tesseract after following the rest of the instructions in order.
Running linux 3.2.0-4-amd64 on this system.
Whereis tesseract-ocr returns:
/usr/share/tesseract-ocr
Whereis leptonica returns:
/usr/include/leptonica
Whereis tesseract returns:
tesseract: /usr/bin/tesseract /usr/bin/X11/tesseract /usr/include/tesseract/ /usr/share/man/man1/tesseract.1.gz
I've also tried running a few other tutorials/guides to install python-tesseract that have returned other errors such as, missing libleptonica then missing libc6 but I havn't investigated these as much. Just tried to see if any other guides worked immidiately.
Also, when I run tesseract in the terminal it works, but import tesseract does not.
What am I doing wrong? How can I fix this and install python-tesseract?
I think this way could work for you:
1- download python-tesseract_0.9-0.5ubuntu3_vivid_amd64.deb from here
2- install gdebi-core
sudo apt-get install gdebi-core
3- install python-tesseract_0.9-0.5ubuntu3_vivid_amd64.deb with gdebi
sudo gdebi python-tesseract_0.9-0.5ubuntu2_i386.deb
Related
I tried to install the lanelet2 library according to the github installation guide at https://github.com/fzi-forschungszentrum-informatik/Lanelet2.
When I perform catkin build I get the following error:
Errors << lanelet2_python:cmake /home/student/catkin_ws/logs/lanelet2_python/build.cmake.000.log
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
Could not find a package configuration file provided by "boost_python3"
(requested version 1.71.0) with any of the following names:
boost_python3Config.cmake
boost_python3-config.cmake
Add the installation prefix of "boost_python3" to CMAKE_PREFIX_PATH or set
"boost_python3_DIR" to a directory containing one of the above files. If
"boost_python3" provides a separate development package or SDK, be sure it
has been installed.
My OS is Ubuntu 20.04 with ROS noetic. The build is performed inside a venv with Python Version 3.8.10.
The command python is pointing to python3. I've also installed the following dependencies:
sudo apt-get install ros-noetic-rospack ros-noetic-catkin ros-noetic-mrt-cmake-modules
sudo apt-get install libboost-dev libeigen3-dev libgeographic-dev libpugixml-dev libpython3-dev libboost-python-dev python3-catkin-tools
Does someone have an idea how to resolve this error?
See neutrinoyu's comment at https://github.com/ethz-asl/kalibr/issues/368#issuecomment-651726289
/kalibr/Schweizer-Messer/numpy_eigen/cmake/add_python_export_library.cmake:89
change
list(APPEND BOOST_COMPONENTS python3)
to
list(APPEND BOOST_COMPONENTS python)
I recently deleted the default python version on Fedora 31 and installed python 3.9 then made it as default, now I have multiple versions of python.
If I type: whereis python in my terminal this list appear:
python: /usr/bin/python /usr/bin/python3.9 /usr/bin/python3.7 /usr/bin/python3.9-config /usr/bin/python3.7m /usr/bin/python3.9-x86_64-config /usr/lib/python3.9 /usr/lib/python2.6 /usr/lib/python3.7 /usr/lib64/python3.9 /usr/lib64/python3.7 /usr/local/bin/python3.7m-config /usr/local/bin/python3.7 /usr/local/bin/python3.7m /usr/local/lib/python3.7 /usr/include/python3.9 /usr/include/python3.7m /usr/share/man/man1/python.1.gz /usr/src/Python-3.7.4/python
If I type pip then I get ModuleNotFoundError: No module named 'pip'
Also multiple packages are broken such as dnf, argcomplete, pip, etc.
I cannot update or install anything.
How can I solve this problem ?
Grab/Download the original python RPMs for your distro and reinstall them that way if they're not still cached under /var ....
With Python 3.9 you should use pip3...So install python3-pip.
That should do the trick
I tried many solutions and didn't work, however I ended up backing up my data and completely deleting the OS, then I downloaded the last version of fedora and restored my data on it.
thanks for your time
I ran into this unfortunate situation as well on Fedora 35. dnf, yum, and a bunch of other things broke.
I didn't manage to get Python 3.10 back through dnf, yum, or apt-get. I downloaded the rpm from https://fedora.pkgs.org/35/fedora-x86_64/python3-3.10.0-1.fc35.x86_64.rpm.html. It did require a dependency of python3-libs which I downloaded from: https://fedora.pkgs.org/35/fedora-x86_64/python3-libs-3.10.0-1.fc35.x86_64.rpm.html.
I installed python3-libs first with sudo rpm -i python3-libs-3.10.0-1.fc35.x86_64.rpm --force as there were some file writing conflicts. I ran the same command for the python3.10 rpm with the --force flag as well since there were 2 conflicts. After that, everything worked perfectly! Managed to dodge having to do a full reinstall.
I get the error "ERROR: sling-2.0.0-py3-none-linux_x86_64.whl is not a supported wheel on this platform. " when trying to install this SLING package.
I run the following command:
$ sudo -H pip3 install http://www.jbox.dk/sling/sling-2.0.0-py3-none-linux_x86_64.whl
ERROR: sling-2.0.0-py3-none-linux_x86_64.whl is not a supported wheel on this platform.
This is my python version:
$ python --version
Python 3.7.3
I check various posts but still don't know how to get rid of it. Please help me, thank you!
These install instructions will not work on a Mac - only on linux. See the bottom of the install page https://github.com/google/sling/blob/master/doc/guide/install.md
Sling install guide says "We currently do not support OSX, but you can check out issue #189 for help on building on OSX."
https://github.com/google/sling/issues/189
Your milage may vary. Those tips are two years old, and things may have changed so they may not work. It may be simplest to run a linux virtual machine on your Mac, into which you install python sling.
I am using Win7 64 bit machine with Python 2.7 installed. I have installed swigwin 3.0.5. When I do "pip install M2Crypto" I got the following errors:
SWIG\_m2crypto.i(30) : Error: Unable to find 'openssl\opensslv.h'
SWIG\_m2crypto.i(33) : Error: Unable to find 'openssl\safestack.h'
SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'
SWIG\_ec.i(7) : Error: Unable to find 'openssl\opensslconf.h'
In some links I found the suggestion is to install openssl-dev. But I could not find the equivalent package for windows (pip install openssl-dev does not work and I have done pip install pyOpenSSL which did not help me).
Thanks in advance for your help in this issue.
Not sure what your OS is. But to solve the issue on MAC OS X Yosemite you need to reinitialise xcode command line tools by using this command in terminal.
xcode-select --install
This solved the problem for me.
I installed pynum and scipy (on osx Lion with python 2.7), but when I tried to build matplotlib
git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
python setup.py build
python setup.py install
I've got these errors:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSTypes.h:242: error: declaration for parameter ‘FMFontDirectoryFilter’ but no such parameter
src/_macosx.m:5912: error: expected ‘{’ at end of input
lipo: can't open input file: /var/folders/qw/pr2f7vq91b3c3ngkxrrqplm8zkv09r/T//ccAgEklo.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1
Could somebody please tell me what is the problem?
P.S.
At first I tried to install it in this way:
pip install -e git+https://github.com/matplotlib/matplotlib#egg=matplotlib-dev
but it does not worked for me
I always find this process more painful than it should be, but I've done it a few times now and I believe that these steps should get you set up:
Get Xcode 4.3.2, it's required for some of the later steps.
Download the latest version of python for OSX from python.org
Grab the Scipy superpack.
Uninstall any previous versions of numpy/matplotlib/scipy that you currently have. That includes doing cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ and moving any numpy/matplotlib/scipy directories or eggs into a temp directory.
cd ~/Downloads(or wherever you downloaded the superpack script to) and run sh install_superpack.sh. Answer no to the question are you installing from a repository cloned to this machine or you'll be confused about why the script keeps failing.
That should be it! You should now be able to boot up the python console and import numpy, scipy, matplotlib.