Bug 1651675 - pip3 cannot install tabulate: ImportError: No module named 'distribute_setup'
Summary: pip3 cannot install tabulate: ImportError: No module named 'distribute_setup'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python34
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Petr Viktorin (pviktori)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-20 14:45 UTC by Brian J. Murrell
Modified: 2018-11-20 15:36 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-11-20 15:36:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Brian J. Murrell 2018-11-20 14:45:40 UTC
Description of problem:
Trying ot use pip3 to install tabulate fails.

Version-Release number of selected component (if applicable):
python34-pip-8.1.2-6.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install python34-pip
2. $ pip3 install --user tabular

Actual results:
Collecting tabular
  Downloading https://files.pythonhosted.org/packages/f1/c4/991f61471be3b2568a55e0c09f07c038f48b06162d08f914a9260b512be2/tabular-0.1.tar.gz (1.1MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "/tmp/pip-build-u6ka8lyy/tabular/setup.py", line 40, in <module>
        import distribute_setup
    ImportError: No module named 'distribute_setup'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-u6ka8lyy/tabular/setup.py", line 50, in <module>
        raise ImportError("distribute was not found and fallback to setuptools was not allowed")
    ImportError: distribute was not found and fallback to setuptools was not allowed
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-u6ka8lyy/tabular/
You are using pip version 8.1.2, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Expected results:
Should install tabular without issue

Comment 1 Miro Hrončok 2018-11-20 15:10:04 UTC
This seems liek bug in tabular. pip just runs their setup.py.

The code is here:

https://github.com/yamins81/tabular/blob/master/setup.py

# distribute import and testing
try:
    import distribute_setup
    distribute_setup.use_setuptools()
    logging.debug("distribute_setup.py imported and used")
except ImportError:
    # fallback to setuptools?
    # distribute_setup.py was not in this directory
    if not (setup_tools_fallback):
        import setuptools
        if not (hasattr(setuptools,'_distribute') and \
                setuptools._distribute):
            raise ImportError("distribute was not found and fallback to setuptools was not allowed")
        else:
            logging.debug("distribute_setup.py not found, defaulted to system distribute")
    else:
        logging.debug("distribute_setup.py not found, defaulting to system setuptools")


My setuptools don't have ._distribute either.



https://github.com/yamins81/tabular/issues/6
https://github.com/yamins81/tabular/issues/7

Comment 2 Brian J. Murrell 2018-11-20 15:36:23 UTC
NVM.  This is not important.


Note You need to log in before you can comment on or make changes to this bug.