ImportError: No module named mixpanel

User 1063 | 12/15/2014, 11:44:08 AM

Hey, I receive the following error when importing graphlab Traceback (most recent call last):

import graphlab as gl

File "/usr/local/<b class="Bold"><b class="Bold">anaconda</b></b>/lib/<b class="Bold"><b class="Bold">python2.7</b></b>/site-packages/graphlab/init.py", line 7, in <module> import graphlab.connect.aws as aws File "/usr/local/anaconda/lib/python2.7/site-packages/graphlab/connect/init.py", line 8, in <module> from graphlabutil.metrictracker import MetricTracker as MetricTracker File "/usr/local/anaconda/lib/python2.7/site-packages/graphlabutil/metric_tracker.py", line 5, in <module> import mixpanel ImportError: No module named mixpanel

  • Whats the version of OS? <b class="Bold"><b class="Bold">Linux, centos 0.6 </b></b>
  • What is the version of python? <b class="Bold"><b class="Bold">2.7</b></b>
  • Are you using ipython? <b class="Bold"><b class="Bold">No</b></b>

I installed the package as following: Note: I'm using anaconda. Download the tar from: https://pypi.python.org/pypi/GraphLab-Create Extract: tar -xvf GraphLab-Create-1.1.tar.gz cd GraphLab-Create-1.1 Install: sudo /usr/local/anaconda/bin/python2.7 setup.py install

It seems that I have a problem installing dependencies for the mixpanel model but the installation finished successfully without any errors.

Thanks in advance,

Comments

User 91 | 12/15/2014, 6:13:46 PM

Thanks for trying to install GLC. Could you try the following:

a) Download the GLC 1.1 tar. b) pip install GraphLab-Create-1.1.tar.gz


User 1063 | 12/16/2014, 5:43:10 AM

Thank you for your response.

I tried this already. I change the pip to use my pytohn2.7 but it keeps using the 2.6.

<b class="Bold">$ export PREFIXPATH='/usr/local/anaconda/bin/python2.7' $ echo $PREFIXPATH /usr/local/anaconda/bin/python2.7 $ sudo pip install --install-option="--prefix=$PREFIX_PATH" /home/n ancy/Downloads/GraphLab-Create-1.1.tar.gz

</b>

I get : <i class="Italic">Unpacking ./Downloads/GraphLab-Create-1.1.tar.gz Running setup.py (path:/tmp/pip-glW5tJ-build/setup.py) egginfo for package fr om file:///home/nancy/Downloads/GraphLab-Create-1.1.tar.gz Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip-glW5tJ-build/setup.py", line 10, in <module> from graphlabutil.config import DEFAULTCONFIG as CONFIG File "graphlabutil/init.py", line 12, in <module> logging.config.dictConfig({ AttributeError: 'module' object has no attribute 'dictConfig' Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/tmp/pip-glW5tJ-build/setup.py", line 10, in <module>

from graphlab_util.config import DEFAULT_CONFIG as CONFIG

File "graphlab_util/init.py", line 12, in <module>

logging.config.dictConfig({

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


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-glW5tJ-bui ld Storing debug log for failure in /root/.pip/pip.log

</i>

The error in log: <b class="Bold">$ sudo less /root/.pip/pip.log</b>

Removing temporary dir /tmp/pipbuildroot... Command python setup.py egginfo failed with error code 1 in /tmp/pip-MgN06h-build Exception information: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg/pip/commands/install.py", line 278, in run requirementset.preparefiles(finder, forcerootegginfo=self.bundle, bundle=self.bundle) File "/usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg/pip/req.py", line 1229, in preparefiles reqtoinstall.runegginfo() File "/usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg/pip/req.py", line 325, in runegginfo commanddesc='python setup.py egginfo') File "/usr/lib/python2.6/site-packages/pip-1.5.6-py2.6.egg/pip/util.py", line 697, in callsubprocess % (commanddesc, proc.returncode, cwd)) InstallationError: Command python setup.py egginfo failed with error code 1 in /tmp/pip-MgN06h-build

</i>


User 14 | 12/16/2014, 6:09:52 AM

<pre><code>sudo pip2.7 install</code></pre> will let you use python2.7 for pip.


User 1063 | 12/16/2014, 6:11:51 AM

Tried this of course.

$ sudo pip2.7 install /home/nancy/Downloads/GraphLab-Create-1.1.tar.gz sudo: pip2.7: command not found


User 1063 | 12/16/2014, 6:16:35 AM

Tried to update pip: $ pip install --upgrade pip Requirement already up-to-date: pip in /usr/local/<b class="Bold">anaconda/lib/python2.7</b>/site-packages Cleaning up...

$ sudo easy_install pip Searching for pip Best match: pip 1.5.6 Processing pip-1.5.6-py2.6.egg pip 1.5.6 is already the active version in easy-install.pth Installing pip script to /usr/bin Installing pip2.6 script to /usr/bin Installing pip2 script to /usr/bin

Using /usr/lib/<b class="Bold">python2.6</b>/site-packages/pip-1.5.6-py2.6.egg Processing dependencies for pip Finished processing dependencies for pip


User 1037 | 12/16/2014, 6:22:31 PM

Are you on a system without regular python2.7 installed?


User 10 | 12/16/2014, 7:33:02 PM

I think 'sudo' might be getting in the way. I believe the root user is still using Python 2.6, but the local user (nancy) is using Python 2.7 with Anaconda. Same situation for pip (the pip run as nancy is updated and using Anaconda site-packages location).

Instead, have you tried:

  1. activate conda environment
  2. pip install /home/nancy/Downloads/GraphLab-Create-1.1.tar.gz
  3. python -c 'import graphlab; print "Installed GraphLab Successfully"'

Did this work?

Thanks for trying out GraphLab Create.


User 1063 | 12/18/2014, 7:06:08 AM

Unfortunately ,not. I receive a Permission denied message as following:

$ pip install /home/nancy/Downloads/GraphLab-Create-1.1.tar.gz Unpacking ./Downloads/GraphLab-Create-1.1.tar.gz Running setup.py (path:/tmp/pip-FhtGRK-build/setup.py) egg_info for package from file:///home/nancy/Downloads/GraphLab-Create-1.1.tar.gz

Requirement already satisfied (use --upgrade to upgrade): GraphLab-Create==1.1 from file:///home/nancy/Downloads/GraphLab-Create-1.1.tar.gz in /usr/local/anaconda/lib/python2.7/site-packages Downloading/unpacking boto==2.33.0 (from GraphLab-Create==1.1) Downloading boto-2.33.0-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded Downloading/unpacking librato-metrics==0.4.9 (from GraphLab-Create==1.1) Downloading librato-metrics-0.4.9.tar.gz Running setup.py (path:/tmp/pipbuildnancy/librato-metrics/setup.py) egg_info for package librato-metrics

Downloading/unpacking mixpanel-py==3.1.1 (from GraphLab-Create==1.1) Downloading mixpanel-py-3.1.1.tar.gz Running setup.py (path:/tmp/pipbuildnancy/mixpanel-py/setup.py) egg_info for package mixpanel-py

Downloading/unpacking decorator==3.4.0 (from GraphLab-Create==1.1) Downloading decorator-3.4.0.tar.gz Running setup.py (path:/tmp/pipbuildnancy/decorator/setup.py) egg_info for package decorator

warning: no previously-included files found matching 'Makefile'

Requirement already satisfied (use --upgrade to upgrade): tornado==3.2.1 in /usr/local/anaconda/lib/python2.7/site-packages (from GraphLab-Create==1.1) Downloading/unpacking prettytable==0.7.2 (from GraphLab-Create==1.1) Downloading prettytable-0.7.2.tar.bz2 Running setup.py (path:/tmp/pipbuildnancy/prettytable/setup.py) egg_info for package prettytable

Requirement already satisfied (use --upgrade to upgrade): requests==2.3.0 in /usr/local/anaconda/lib/python2.7/site-packages (from GraphLab-Create==1.1) Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/anaconda/lib/python2.7/site-packages (from librato-metrics==0.4.9->GraphLab-Create==1.1) Installing collected packages: boto, librato-metrics, mixpanel-py, decorator, prettytable Found existing installation: boto 2.28.0 Uninstalling boto: Cleaning up... <b class="Bold"><b class="Bold">Exception</b></b>: Traceback (most recent call last): File "/usr/local/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/local/anaconda/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run requirementset.install(installoptions, globaloptions, root=options.rootpath) File "/usr/local/anaconda/lib/python2.7/site-packages/pip/req.py", line 1431, in install requirement.uninstall(autoconfirm=True) File "/usr/local/anaconda/lib/python2.7/site-packages/pip/req.py", line 598, in uninstall pathstoremove.remove(autoconfirm) File "/usr/local/anaconda/lib/python2.7/site-packages/pip/req.py", line 1836, in remove renames(path, new_path) File "/usr/local/anaconda/lib/python2.7/site-packages/pip/util.py", line 295, in renames shutil.move(old, new) File "/usr/local/anaconda/lib/python2.7/shutil.py", line 303, in move os.unlink(src) OSError: [Errno 13] <b class="Bold"><b class="Bold">Permission denied</b></b>: '/usr/local/anaconda/lib/python2.7/site-packages/boto-2.28.0-py2.7.egg-info'


User 1063 | 12/18/2014, 7:20:51 AM

If I would change the root user to link to Python 2.7, would it work?


User 1063 | 12/18/2014, 5:23:46 PM

I actually read that changing the root user default python version is not recommended - so forget my last comment.
What drives my crazy is, when installing trough running the command :"sudo /usr/local/anaconda/bin/python2.7 setup.py install" no errors were found but the "import graphlab" results an error.

Any other suggestions?