GraphLab Create not importing correctly - AttributeError

User 5215 | 5/20/2016, 7:22:47 PM

When attempting to import graphlab create the program stalls. Only after killing the process do I receive an attribute error ('module' object has no attribute 'connect'). I'm not sure how to diagnose the problem.

GraphLab exists (...\Anaconda2\Lib\site-packages\graphlab) in the sys.path (...\Anaconda2\lib\site-packages).

Any help is appreciated! Thanks.

Comments

User 1207 | 5/20/2016, 8:32:18 PM

Hello @jd2504,

This error seems to be due to a messed up install; unfortunately, pip has had some errors in using the cache. Can you do:

pip install --no-cache-dir --upgrade --no-cache-dir Graphlab-Create

and tell me if that fixes the issue?

Thanks! -- Hoyt


User 5215 | 5/23/2016, 2:48:54 PM

@hoytak, thanks a lot for the response. I used the --no-cache-dir option and it looks like everything's coming back as 'already up-to-date' and I'm still getting the error (below). The path site-packages/graphlab/connect/ also exists, so not sure why the 'connect' module isn't being recognised.


AttributeError Traceback (most recent call last) <ipython-input-3-4b66ad388e97> in <module>() ----> 1 import graphlab

~\Anaconda2\envs\dato-env\lib\site-packages\graphlab_init__.py in <module>() 42 from graphlab.util import setruntimeconfig 43 ---> 44 import graphlab.connect as mt 45 import graphlab.connect.aws as aws 46 from . import visualization

AttributeError: 'module' object has no attribute 'connect'


User 1207 | 5/23/2016, 6:05:22 PM

Hey @jd2504,

Sorry about these issues -- we've seen this before on a bad install, so could you try one more thing?

First uninstall the package -- pip uninstall Graphlab-Create, then repeat the command. Hopefully that fixes it.

Thanks! -- Hoyt


User 5215 | 5/23/2016, 7:39:12 PM

Hi @hoytak, unfortunately I'm still getting the same error. I'm running Anaconda and uninstalled then reinstalled both my Anaconda and GraphLab installs and am still seeing this error:

AttributeError: 'module' object has no attribute 'connect'`


User 1207 | 5/24/2016, 1:36:32 AM

Hey @jd2504,

I'm looking into it. Usually this happens when either the installation was bad or the dato environment isn't initialized properly. The former can happen from an aborted install, or if graphlab was ever installed using sudo pip. The latter tends to happen if, for instance, ipython notebook is run and then the environment is initialized.

What's your setup? I'm trying to reproduce this to track it down.

Thanks! -- Hoyt


User 5215 | 5/24/2016, 3:21:18 PM

@hoytak, really appreciate the help! I hadn't used sudo at any point in the installation.

  • The initial install through the Dato Launcher (import graphlab initially worked fine)
  • import graphlab started returning: AttributeError: 'module' object has no attribute 'connect'
  • Have tried both uninstalling/reinstalling through pip within a conda environment conda create -n dato-env python=2.7 anaconda activate dato-env pip install --upgrade --no-cache-dir https://get.graphlab.com/GraphLab-Create/1.9/[email]/[license key]/GraphLab-Create-License.tar.gz

Thanks again! Joel


User 1207 | 6/2/2016, 8:23:14 PM

Hey @jd2504,

Sorry to not get back to you -- I somehow missed your reply earlier.

Also, we are releasing a new version today that also includes a number of bugfixes. Could you try updating to that and see if it fixes the issue? pip install --upgrade --no-cache-dir graphlab-create should work for that.

Otherwise, I'm really not sure what is happening here, but I'll see if I can get someone to figure this out.

Thanks! -- Hoyt


User 5215 | 6/3/2016, 1:35:57 PM

Hi @hoytak, that seems to have worked. import graphlab is loading correctly now.

Thanks again for all the help!