sharkbait11
Posts: 2
Joined: Mon Nov 30, 2015 3:52 am

IMAPclient wont install properly

Mon Nov 30, 2015 3:56 am

Hey guys!

I got my Pi a few weeks ago and I've been tinkering with it. I want to setup my pi to notify my when i get an email with LED's. So I've been following an online guide.

Well the issue is when I try to run -

sudo apt-get install imapclient

I get the following error -
This is my hold up at the moment. Anyone ran into this before?

Code: Select all

Downloading/unpacking imapclient
  Running setup.py egg_info for package imapclient
    mock requires setuptools>=17.1. Aborting installation
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/pi/build/imapclient/setup.py", line 105, in <module>
        cmdclass={'test': TestDiscoverCommand})
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1096, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with 1
    Complete output from command python setup.py egg_info:
    mock requires setuptools>=17.1. Aborting installation

Traceback (most recent call last):

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

  File "/home/pi/build/imapclient/setup.py", line 105, in <module>

    cmdclass={'test': TestDiscoverCommand})

  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__

    self.fetch_build_eggs(attrs.pop('setup_requires'))

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs

    parse_requirements(requires), installer=self.fetch_build_egg

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve

    dist = best[req.key] = env.best_match(req, self, installer)

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match

    return self.obtain(req, installer) # try and download/install

  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain

    return installer(requirement)

  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg

    return cmd.easy_install(req)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 608, in easy_install

    return self.install_item(spec, dist.location, tmpdir, deps)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 638, in install_item

    dists = self.install_eggs(spec, download, tmpdir)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 828, in install_eggs

    return self.build_and_install(setup_script, setup_base)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1105, in build_and_install

    self.run_setup(setup_script, setup_base, args)

  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1096, in run_setup

    raise DistutilsError("Setup script exited with %s" % (v.args[0],))

distutils.errors.DistutilsError: Setup script exited with 1

sharkbait11
Posts: 2
Joined: Mon Nov 30, 2015 3:52 am

Re: IMAPclient wont install properly

Tue Dec 01, 2015 3:53 am

For anyone with a similar issue I went to this link and verified all of my libraries.

Looks like I was missing a few-

https://jeffskinnerbox.wordpress.com/li ... pberry-pi/

Aydan
Posts: 710
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: IMAPclient wont install properly

Tue Dec 01, 2015 9:50 am

sharkbait11 wrote:For anyone with a similar issue I went to this link and verified all of my libraries.

Looks like I was missing a few-

https://jeffskinnerbox.wordpress.com/li ... pberry-pi/
That means the package has incomplete dependencies.
This should be fixed by the package maintainer.

User avatar
KnightOfPi
Posts: 50
Joined: Sun Dec 28, 2014 12:57 pm
Location: Vienna - Austria
Contact: Website

Re: IMAPclient wont install properly

Wed Dec 16, 2015 11:59 am

Hi,

i did have the same problem- imapclient installation didn't work on a pre-Jessie Raspbian.
Here is how i fixed it:

Code: Select all

sudo pip install --upgrade setuptools
wget https://pypi.python.org/packages/source/m/mock/mock-1.3.0.tar.gz
tar xf mock-1.3.0
cd mock-1.3.0
sudo python setup.py install
sudo apt-get install libffi-dev python-pip
sudo pip install imapclient
Have fun!
Check out www.knight-of-pi.org for many beginner-friendly tutorials!

depauw
Posts: 44
Joined: Mon Nov 09, 2015 2:12 pm

Re: IMAPclient wont install properly

Mon Mar 28, 2016 6:41 pm

Hello,

i'v tried the solution of sharkbait11, but i've got this error

tar: mock-1.3.0: Function open() failed: file or map does not exist
tar: Error is not recoverable: exiting now

Any suggestions?


kind regards,
Christophe

Return to “Troubleshooting”