Orange Forum • View topic - Unable to install on CentOS 5.9 with pip & setuptools

Unable to install on CentOS 5.9 with pip & setuptools

A place to ask questions about methods in Orange and how they are used and other general support.

Unable to install on CentOS 5.9 with pip & setuptools

Postby JosephS » Tue Jul 02, 2013 19:22

Hello,
I am trying to install Orange on a CentOS box using pip (1.3.1) and setuptools (0.7.4) and python 2.6 (from EPEL). From the error message I get, it appears that Orange has a dependency of distribute 0.6.26 in setup.py. However, distribute has been merged back into setuptools as of version 0.7 according to everything I've been able to find.

Is there an easy way to get around this without having to edit setup.py? I have a number of machines that this will eventually end up on, so a solution that is workable with Puppet is appreciated.

Thank you.

Here is the error I get:

Code: Select all
[vagrant@vagrant-centos-5 ~]$ sudo pip install orange
Downloading/unpacking orange
  Downloading Orange-2.7.tar.gz (13.3MB): 13.3MB downloaded
  Running setup.py egg_info for package orange
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.26.tar.gz
    Extracting in /tmp/tmpqpVziu
    Now working in /tmp/tmpqpVziu/distribute-0.6.26
    Building a Distribute egg in /tmp/pip-build-root/orange
    Traceback (most recent call last):
      File "setup.py", line 38, in <module>
        exec(open(init_path).read(), d)
      File "<string>", line 8, in <module>
      File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/dist.py", line 6, in <module>
        from setuptools.command.install import install
      File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2731, in <module>
        add_activation_listener(lambda dist: dist.activate())
      File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 704, in subscribe
        callback(dist)
      File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2731, in <lambda>
        add_activation_listener(lambda dist: dist.activate())
      File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2231, in activate
        self.insert_on(path)
      File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2332, in insert_on
        "with distribute. Found one at %s" % str(self.location))
    ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /usr/lib/python2.6/site-packages/setuptools-0.7.4-py2.6.egg
    /tmp/pip-build-root/orange/distribute-0.6.26-py2.6.egg
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-root/orange/setup.py", line 5, in <module>
        distribute_setup.use_setuptools()
      File "distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "distribute_setup.py", line 125, in _do_download
        _build_egg(egg, tarball, to_dir)
      File "distribute_setup.py", line 116, in _build_egg
        raise IOError('Could not build the egg.')
    IOError: Could not build the egg.
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.26.tar.gz

Extracting in /tmp/tmpqpVziu

Now working in /tmp/tmpqpVziu/distribute-0.6.26

Building a Distribute egg in /tmp/pip-build-root/orange

Traceback (most recent call last):

  File "setup.py", line 38, in <module>

    exec(open(init_path).read(), d)

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

  File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/__init__.py", line 2, in <module>

    from setuptools.extension import Extension, Library

  File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/extension.py", line 5, in <module>

    from setuptools.dist import _get_unpatched

  File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/dist.py", line 6, in <module>

    from setuptools.command.install import install

  File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/command/__init__.py", line 8, in <module>

    from setuptools.command import install_scripts

  File "/tmp/tmpqpVziu/distribute-0.6.26/setuptools/command/install_scripts.py", line 3, in <module>

    from pkg_resources import Distribution, PathMetadata, ensure_directory

  File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2731, in <module>

    add_activation_listener(lambda dist: dist.activate())

  File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 704, in subscribe

    callback(dist)

  File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2731, in <lambda>

    add_activation_listener(lambda dist: dist.activate())

  File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2231, in activate

    self.insert_on(path)

  File "/tmp/tmpqpVziu/distribute-0.6.26/pkg_resources.py", line 2332, in insert_on

    "with distribute. Found one at %s" % str(self.location))

ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /usr/lib/python2.6/site-packages/setuptools-0.7.4-py2.6.egg

/tmp/pip-build-root/orange/distribute-0.6.26-py2.6.egg

Traceback (most recent call last):

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

  File "/tmp/pip-build-root/orange/setup.py", line 5, in <module>

    distribute_setup.use_setuptools()

  File "distribute_setup.py", line 145, in use_setuptools

    return _do_download(version, download_base, to_dir, download_delay)

  File "distribute_setup.py", line 125, in _do_download

    _build_egg(egg, tarball, to_dir)

  File "distribute_setup.py", line 116, in _build_egg

    raise IOError('Could not build the egg.')

IOError: Could not build the egg.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/orange
Storing complete log in /home/vagrant/.pip/pip.log

Re: Unable to install on CentOS 5.9 with pip & setuptools

Postby Ales » Wed Jul 03, 2013 11:20

I have updated the included distribute_setup.py to the latest version, which tests for installed setuptools 0.7.

Can you try installing Orange using
Code: Select all
pip install hg+https://bitbucket.org/biolab/orange

Re: Unable to install on CentOS 5.9 with pip & setuptools

Postby JosephS » Wed Jul 03, 2013 16:14

That resolved my issue and I was able to install it on my testing VM.

Thank you.

Code: Select all
<cut compiler output>
Successfully installed Orange
Cleaning up...
[vagrant@vagrant-centos-5 ~]$ pip freeze |grep Orange
Orange==2.7.1


Return to Questions & Support