aptivate / python-tika

Python wrapper for Apache Tika, made to be easy_installed
http://tika.apache.org/
25 stars 10 forks source link

Import Error #1

Open swasheck opened 12 years ago

swasheck commented 12 years ago

Hi. Thanks for your work on this project. I'm probably doing something wrong here so feel free to let me know where I've missed something. Here are my steps:

virtualenv test_tika
cd test_tika
source bin/activate
pip install git+git://github.com/aptivate/jcc.git
pip install git+git://github.com/aptivate/python-tika.git

Up until this point I have no problems.

then:

python
import tika

renders :


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/{PATH}/test_tika/lib/python2.7/site-packages/tika/__init__.py", line 2, in <module>
    import os, _tika
ImportError: dynamic module does not define init function (init_tika)

This is on Arch Linux - 3.3.2-1-ARCH #1 SMP PREEMPT x86_64

Python 2.7.3

mlambir commented 12 years ago

Where you able to resolve this issue? I'm getting the same error. I'd appreciate any pointers in the right direction.

Bengt commented 12 years ago

I ran into this, too on Fedora 17 (kernel 3.5.3-1.fc17.x86_64) with Python 2.7.3 and Java 1.7.0 .

Bengt commented 12 years ago

@mlambir have a look at the pull request I referenced, it fixes this issue for me.

JoeJasinski commented 11 years ago

@Bengt, thanks for putting that repo together. However, I'm using the branch from your repo, but also get the exact same error as above.

>>> import tika
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jjasinski/Sites/testhaystack/lib/python2.7/site-packages/tika-1.1-py2.7-linux-i686.egg/tika/__init__.py", line 2, in <module>
    import os, _tika
ImportError: dynamic module does not define init function (init_tika)
JoeJasinski commented 11 years ago

For some more information on my development environment, if it will help:

Python Version: Python 2.7.3 OS Version: Ubuntu Quantal JCC Setup: JCC_JDK="/usr/lib/jvm/java-7-openjdk-i386/"

Confirm JCC is installed

>>> import jcc
>>> jcc
<module 'jcc' from '/home/jjasinski/Sites/testhaystack/lib/python2.7/site-packages/jcc/__init__.pyc'>
>>> jcc.CLASSPATH
'/home/jjasinski/Sites/testhaystack/lib/python2.7/site-packages/jcc/classes'