mailgun / talon

Apache License 2.0
1.27k stars 285 forks source link

Problem while installing talon #84

Open umangwy opened 8 years ago

umangwy commented 8 years ago

Hi installed talon using python setup.py install. If I am calling talon.init() now it is throwing following error. What could be the issue?

> line 9, in <module>
    talon.init()
  File "build/bdist.linux-x86_64/egg/talon/__init__.py", line 7, in init

  File "build/bdist.linux-x86_64/egg/talon/signature/__init__.py", line 38, in initialize

  File "build/bdist.linux-x86_64/egg/talon/signature/learning/classifier.py", line 31, in load
  File "/usr/local/lib/python2.7/site-packages/scikit_learn-0.16.1-py2.7-linux-x86_64.egg/sklearn/externals/joblib/numpy_pickle.py", line 409, in load
    with open(filename, 'rb') as file_handle:
IOError: [Errno 20] Not a directory: '/usr/local/lib/python2.7/site-packages/talon-1.2.5-py2.7.egg/talon/signature/data/classifier'
BarryJRowe commented 8 years ago

We've also come into this problem. Only works if installed via pip, not setup.py.

obukhov-sergey commented 8 years ago

@umangwy @BarryJRowe it's probably related to how numpy, scikit is installed. If you first install numpy and scikit it's probably going to work. I suggest it as a workaround - not like a permanent solution.

sandish2222 commented 8 years ago

@obukhov-sergey how to fix the issue? first install numpy and scikit , and then install talon? it cant work for me

cristicbz commented 7 years ago

I also can't get this to work, any luck? Just installing via pip in a fresh Docker container fails with the given error :(

te-565 commented 7 years ago

Got around this by uninstalling numpy and scikit-learn and then installing talon via pip install talon --no-cache-dir

alexyorke commented 7 years ago

Here's how I got it working after many unsuccessful attempts:

apt-get update && apt-get upgrade
apt install python-pip
pip install talon
pip install --upgrade pip

However, I tried the above commands on a two year old Debian box, and it complained about a lapack dependency, which I was unable to resolve (and could not install talon.) I don't know if this has to do with my configuration, or if Talon works good on Ubuntu.

nguyentony commented 7 years ago

The reason is that it is looking for the classifier file here /usr/local/lib/python2.7/site-packages/talon-1.2.5-py2.7.egg/talon/signature/data/classifier while it is located in talon/signature/data. It will work if you run it while you are in the talon directory.