Import problem in Ubuntu

User 1763 | 4/14/2015, 6:39:13 PM

I followed the instructions and the installation went ok however when importing graphlab I get the following error:

import graphlab as gl Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/graphlab/init.py", line 37, in <module> import graphlab.deploy File "/usr/local/lib/python2.7/dist-packages/graphlab/deploy/init.py", line 26, in <module> defaultsession = session.open() File "/usr/local/lib/python2.7/dist-packages/graphlab/deploy/session.py", line 532, in open return Session(location) File "/usr/local/lib/python2.7/dist-packages/graphlab/deploy/session.py", line 111, in init self.lock = lockfile.LockFile(os.path.join(self.location, 'lock')) AttributeError: 'module' object has no attribute 'LockFile'

Thanks for your help!

Comments

User 940 | 4/16/2015, 12:50:11 AM

Hi @lrargerich ,

Have you tried installing GraphLab Create in a fresh virualenv with lockfile 0.9?

Cheers! -Piotr


User 1592 | 4/16/2015, 7:14:53 AM

Hi, this error is fixed in 1.4 and will be release out soon (in a couple of weeks).

In the meantime, the version of the lockfile Python package that gets installed on Ubuntu by pip has a different interface than the latest version of lockfile.

The error code GraphLab spits says: File "/usr/local/lib/python2.7/dist-packages/graphlab/deploy/session.py", line 111, in init self.lock = lockfile.LockFile(os.path.join(self.location, 'lock'))

So please go to this file and switch line 111: self.lock = lockfile.LockFile(_os.path.join(self.location, 'lock'))

With this version: self.lock = lockfile.FileLock(_os.path.join(self.location, 'lock'))

And let us know if this solves your issue.

Thanks


User 1245 | 5/3/2015, 4:06:52 PM

It's worked

Thanks