GraphLab Create "ImportError: No module named graphlab"

I followed these instructions to configure GraphLab on my Ubuntu computer. In the end, I opened Python 2.7.6 and ran the first test line import graphlab as gl . It gave me

 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named graphlab 

How can I start diagnosing this?

Details:

I ran python -V from the terminal and it returned Python 2.7.6 to me.

In /usr/bin I find the following pyth* entries ... Interestingly, something was pointing somewhere to the wrong version:

 python python2.7-config python3.4 python-config python2 python2-config python3.4m pythontex python2.7 python3 python3m pythontex3 
+8
source share
11 answers

Dato Graphlab Create installer didn't actually install graphics on my Mac (El Capitan). I did the following (Anaconda installed) in a terminal window:

 % pip install graphlab-create 

This subsequently installed Graphlab Create. Then you can easily check:

 % python Python 2.7.10 |Continuum Analytics, Inc.| (default, Sep 15 2015, 14:29:08) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org >>> import graphlab >>> 

I noticed that sometimes Python forgets that Graphlab Create is installed. Repeating the above pip command will make her remember.

python anaconda graphlab

+11
source share

Another option is to use virtualenvwrapper to easily create and apply virtual environments. For example, following this documentation , start with the installation:

 sudo pip install virtualenvwrapper 

Open the .bashrc settings .bashrc , for example, run gedit .bashrc and add the following lines to the end:

 export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/Devel source /usr/local/bin/virtualenvwrapper.sh 

Reload the terminal window, and then you can create your own virtual environment, for example, name it "test":

 mkvirtualenv test 

Now the test is a virtual environment, and you are in it (ie test "activated" at the moment). To put GraphLab in test ,

 pip install graphlab-create 

Similarly, you can install other python tools in test with pip , and any python program launched from test will only be able to see the python toolset that are installed here.

+5
source share

Perhaps you should install graphics in virtualenv.

1. Make sure your system is installed virtualenv. To check, run pip freeze . To install, run sudo pip install virtualenv in your terminal before continuing

2.Copy and execute the following commands in your terminal. This will create a virtual environment called "graphlab" and set the graphics to create version 0.9.1

 virtualenv graphlab . graphlab/bin/activate pip install graphlab-create==0.9.1 
+2
source share

You may need to activate conda env by running

source activates dato-env

inside the terminal

+2
source share

Check your system path

import sys print sys.path

It should contain graphlab-0.9.1. If not, then with our installation it was strange. I recommend using a virtual environment in python.

+1
source share

I had the same problem on the ubuntu 16 desktop. The solution for me was pretty simple. After starting the laptop using

  (gl-env) davis@smeagol :~/progs/ml-foundations$ jupyter notebook 

Click the file navigator to find your notepad where you import graphlab, which causes an error. When he starts the laptop, I assume that you see | Python [Root] in the upper right corner. To fix this, click the title bar "Kernel-> Modify kernel-> gl-env. Now the top right shortcut should say | Python [gl-env]. Subsequently, when you start the laptop, import graphlab will work.

The Jupyter UI main landing page has a tab that has Conda in it. In this you can see two envs with the name root and gl-env. I tried to delete the root file, and although it is not by default, all my laptops start with this environment, and deleting from it causes an internal error.

+1
source share

If you do not see graphlab, just the path to the environment is not set to "dato-env" (rather, it can be set to "root")

If you use the "Launcher" application, in the upper left corner set "Environment" to "dato-env".

0
source share

Graphlab is not supported on python3. Install Python 2.7 as stated in https://conda.io/docs/user-guide/tasks/manage-python.html

0
source share

Well, I think the stream is dead.

After iterating over w / un / reinstallations multiple times, the only way to get "import graphlab" to work reliably is to manually activate dato-env. Open a terminal and enter the command below

 source activate dato-env 

Before this, close all jupyter laptops. I state that dato-env is valid when my bash request changes to: (dato-env) pydev@smruti :~$

Now on your Jupyter laptop, try import graphlab , this will run without displaying the import error.

Hope this helps!

0
source share

I had the same problems, but then I found that in the files that go along with the machine learning specialization ( https://www.coursera.org/learn/ml-foundations/notebook/lGQH5/open-your-notebook- workspace -continue ) there are several additional codes after which you will not receive any errors:

 import graphlab 

Install the product key on this computer. After starting this cell, you will not need to re-enter the product key.

 graphlab.product_key.set_product_key('your product key here') 

Limit the number of workflows. This saves system memory, which prevents the failure of hosted laptops.

 graphlab.set_runtime_config('GRAPHLAB_DEFAULT_NUM_PYLAMBDA_WORKERS', 4) 

Display the active product key.

 graphlab.product_key.get_product_key() 
0
source share

( https://www.coursera.org/learn/ml-foundations/notebook/lGQH5/open-your-notebook-workspace-to-follow-along )

follow this link, enter jupyter notebook in your terminal and execute the command indicated in the link. Enter your license number

No need to create any kind of virtual environment

0
source share

All Articles