Problem when import graphlab

User 3531 | 3/13/2016, 11:01:08 AM

It will be stuck whenever I run "import graphlab" in Python or Anaconda Python. After Ctrl+C, the same error will be output:

KeyboardInterrupt Traceback (most recent call last) <ipython-input-1-148fd358837b> in <module>() ----> 1 from graphlab.toolkits import evaluation

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/init.pyc in <module>() 64 from graphlab.toolkits import evaluation 65 import graphlab.toolkits.textanalytics as textanalytics ---> 66 import graphlab.toolkits.graphanalytics as graphanalytics 67 import graphlab.toolkits.internal as internal 68

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/toolkits/graphanalytics/init.py in <module>() 153 154 --> 155 from . import pagerank 156 from . import trianglecounting 157 from . import connected_components

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/toolkits/graphanalytics/pagerank.py in <module>() 10 import graphlab.toolkits.main as main 11 from graphlab.toolkits.graphanalytics.modelbase import GraphAnalyticsModel as ModelBase ---> 12 from graphlab.toolkits.distributed import run as distributedrun 13 from graphlab.distributedexecutionenvironment import getdistributedexecutionenvironment as getdistributedexecutionenvironment 14

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/toolkits/distributed.py in <module>() 13 import logging 14 from graphlab.connect import getmetrictracker ---> 15 from graphlab.deploy.datodistributed.pipeline.dml import dml as dml 16 from graphlab.toolkits.main import ToolkitError 17 from graphlab.toolkits.internalutils import raiseerrorifnotsframe

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/deploy/init.py in <module>() 24 # Sessions 25 from . import session ---> 26 defaultsession = session.open() 27 28 environments = session.ScopedSession(defaultsession, _Environment, """

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/deploy/session.pyc in open(location) 580 LOGGER.info('Using session dir: %s' % location) 581 --> 582 return Session(location) 583 584

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/deploy/session.pyc in init(self, location) 123 versionfile = os.path.join(self.location, 'version') 124 --> 125 with self.lock: 126 if not os.path.exists(versionfile): 127 version = SESSIONVERSION

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/util/lockfile/init.pyc in enter(self) 236 Context manager support. 237 """ --> 238 self.acquire() 239 return self 240

/mirror/anaconda2/envs/dato-env/lib/python2.7/site-packages/graphlab/util/lockfile/linklockfile.pyc in acquire(self, timeout) 47 raise AlreadyLocked("%s is already locked" % 48 self.path) ---> 49 time.sleep(timeout is not None and timeout/10 or 0.1) 50 else: 51 # Link creation succeeded. We're good to go.

KeyboardInterrupt:

It seems it's stuck when "import graphlab.toolkits.graphanalytics as graphanalytics".

Thank you for answering!

Comments

User 1207 | 3/14/2016, 9:01:06 PM

Hello @qyy0180, thanks for your report.

One thing to try is to delete all the lock files -- i.e. runrm -f ~/.graphlab/artifacts/*lock.

If this doesn't fix the problem, then I'm not sure what's happening there. What OS and GLC version are you running? Can you also tell me what the output of gl.get_runtime_config() says? Finally, if you have any logs, those would be helpful in tracking down what the issue is.

Thanks! -- Hoyt


User 3531 | 3/15/2016, 1:12:46 AM

Hi @hoytak ,

Thank you for the answer! I have fixed it.


User 1207 | 3/15/2016, 3:56:48 AM

Glad to hear it! Thanks!