Giter Club home page Giter Club logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
then u need to manually copy all the .so into a single directory. I guess it 
will work

Original comment by [email protected] on 4 Dec 2012 at 2:50

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
I'm trying to figure out from where the module is attempting to load the 
libtesseract.so.3 module.  It is already in my /foo/bar/usr/local/lib and 
permissions are set to 777 just in case.

Original comment by [email protected] on 23 Dec 2012 at 8:00

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
I solved the problem.  I had to modify the PYTHONPATH to include the custom bin 
directory /foo/bar/usr/local/bin

Original comment by [email protected] on 22 Jan 2013 at 6:13

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
Interesting....
How about install python-tesseract to user-directory?

python setup.py install --user

Of course, I haven't tried it before

Original comment by [email protected] on 23 Jan 2013 at 2:58

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
I apologize, I added my lib directory not my bin directory. so my PYTHONPATH = 
/foo/bar/usr/local/lib which is where libtesseract.so is located.  

I attempted to install to user-directory but it does not change anything 
related to the location of libtesseract.so.  If I had compiled tesseract and 
all its dependencies to my user directory, then this may work, but I suspect, I 
would still have to add the user directory containing libtesseract.so to my 
pythonpath

Original comment by [email protected] on 23 Jan 2013 at 8:14

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
[deleted comment]

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
If it is not too much a trouble, please share your successful story (step by 
step preferably) on installing python-tesseract even without an admin right.

Original comment by [email protected] on 24 Jan 2013 at 5:30

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
{{{
eli@eli-iMac:~$ python setup.py install --user
eli@eli-iMac:~$ find . |grep -i _tesseract.so
~/.local/lib/python2.7/site-packages/python_tesseract-tesseract-py2.7-linux-x86_
64.egg/_tesseract.so
}}}

Original comment by [email protected] on 16 Feb 2013 at 9:22

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
a user install would work, but in my particular situation, my user drive does 
not have much space. I am close to finishing my write up on what I did. I had 
to confirm my steps as I did this spread out over several months.  I will post 
soon

Original comment by [email protected] on 16 Feb 2013 at 9:29

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024
Better late than never... I think these are still incomplete, but I no longer 
have the time to fully retest my instructions

In order to setup python-tesseract to a custom prefix, I had to setup a 
completely fresh build environment in a directory where I have permissions.  
Additionally I wanted OpenCV support as well, so I had to build OpenCV as well. 
 I will include the steps I followed for each of these separately.  Assuming 
the directory you have full rights is at /foo/bar.  I chose to install 
tesseract and all dependent libraries to /foo/bar/usr/local.  I had to build 
gcc4.4.7 from source as well because my gcc was producing errors with the 
current version of OpenCV 2.4.3.

Building GCC 4.4.7:
mkdir /foo/bar/sandbox;
cd /foo/bar/sandbox;
svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_4_7_release gcc;
cd /foo/bar/sandbox/gcc;
wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.gz
wget http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.gz
wget http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz
tar -xzf gmp-4.3.2.tar.gz
mv gmp-4.3.2 gmp
tar -xzf mpfr-2.4.2.tar.gz
mv mpfr-2.4.2 mpfr
tar -xzf mpc-0.8.1.tar.gz
mv mpc-0.8.1 mpc
mkdir /foo/bar/sandbox/gcc-build;
cd /foo/bar/sandbox/gcc-build;
/foo/bar/sandbox/gcc/configure --prefix=/foo/bar/usr \
--with-local-prefix=/foo/bar/usr/local
make; 
make install;


Building OpenCV 2.4.3:

cd /foo/bar/sandbox;
wget 
http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4
.3.tar.bz2/download;
tar -xjf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3O
comment out CMakeLists.txt lines 80:104
mkdir /foo/bar/sandbox/OpenCV-2.4.3/build
cd /foo/bar/sandbox/OpenCV-2.4.3/build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/foo/bar/usr/local \
-D BUILD_PYTHON_SUPPORT=ON -D CMAKE_C_COMPILER=/foo/bar/local/bin/gcc \
-D CMAKE_CXX_COMPILER=/foo/bar/local/bin/g++ \
-D CMAKE_LIBRARY_PATH=/foo/bar/usr/local/lib64:/foo/bar/usr/local/lib \
-D CMAKE_INCLUDE_PATH=/foo/bar/usr/local/include
/foo/bar/sandbox/OpenCV-2.4.3
cmake -D OPENCV_BUILD_3RDPARTY_LIBS=TRUE -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_SYSTEM_PREFIX_PATH=/foo/bar/local \
-D CMAKE_INSTALL_PREFIX=/foo/bar/local -D BUILD_PYTHON_SUPPORT=ON \
-D CMAKE_C_COMPILER=/foo/bar/local/bin/gcc \
-D CMAKE_CXX_COMPILER=/foo/bar/local/bin/g++ \
-D 
CMAKE_LIBRARY_PATH=/foo/bar/local/lib64:/foo/bar/local/lib:/usr/lib64:/usr/lib 
/foo/bar/src/OpenCV-2.4.3

make;
make install;

Here are the steps I followed:
1. mkdir /foo/bar/usr/local
2. set environment variables with
export CFLAGS=-I/foo/bar/usr/local/include; export 
LDFLAGS=-L/foo/bar/usr/local/lib:/foo/bar/usr/local/lib64; export 
LIBLEPT_HEADERSDIR=/foo/bar/usr/local/include
3. Compile and install jpeg-8d, giflib-4.1.6, libpng-1.5.13, tiff-4.0.0, 
zlib-1.2.7, and leptonica-1.69 using this command for each library:
./configure --prefix=/foo/bar/usr/local; make; make install;
4. install python 2.7.3 from source to /foo/bar/usr/local:
./configure --prefix=/foo/bar/usr/local; make; make install;
5. grab tesseract-ocr-read-only from svn compile and install:
./configure --prefix=/foo/bar/usr/local; make; make install;
6. copy tesseract-ocr-read-only/ccutil/tprintf.h to /foo/bar/usr/local/include
7. svn checkout http://python-tesseract.googlecode.com/svn/trunk 
python-tesseract
8. cd python-tesseract
9. modify lines 99 & 100 of setup.py:
incls = ['/usr/include', '/usr/local/include', '/foo/bar/usr/local/include']
libs=['/usr/lib', '/usr/local/lib', '/foo/bar/user-supported/usr/local/lib']
10. build and install python-tesseract running:
python config.py;
python setup.py clean;
python setup.py build;
python setup.py install --prefix=/foo/bar/usr/local

Original comment by [email protected] on 13 Jun 2013 at 9:21

from python-tesseract.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 20, 2024

Original comment by [email protected] on 9 May 2014 at 7:49

  • Changed state: Fixed

from python-tesseract.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.