Bug 565853 - Running /usr/bin/coverage fails with ImportError: No module named pkg_resources
Summary: Running /usr/bin/coverage fails with ImportError: No module named pkg_resources
Keywords:
Status: CLOSED DUPLICATE of bug 556290
Alias: None
Product: Fedora
Classification: Fedora
Component: python-coverage
Version: 12
Hardware: All
OS: Linux
high
low
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-16 14:42 UTC by Jan Pazdziora
Modified: 2010-02-16 15:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-16 15:07:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2010-02-16 14:42:55 UTC
Description of problem:

I've installed python-coverage:

# yum install python-coverage
Loaded plugins: dellsysidplugin2, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-coverage.i686 0:3.2-1.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================
 Package                Arch        Version              Repository      Size
==============================================================================
Installing:
 python-coverage        i686        3.2-1.fc12           updates        111 k

Transaction Summary
==============================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 111 k
Is this ok [y/N]: y
Downloading Packages:
python-coverage-3.2-1.fc12.i686.rpm                    | 111 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : python-coverage-3.2-1.fc12.i686                        1/1 

Installed:
  python-coverage.i686 0:3.2-1.fc12                                           

Complete!
#

When I try to run coverage, I get error:

# coverage
Traceback (most recent call last):
  File "/usr/bin/coverage", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
#

When I install python-setuptools, coverage starts to work:

# yum install python-setuptools
Loaded plugins: dellsysidplugin2, refresh-packagekit
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-setuptools.noarch 0:0.6c9-5.fc12 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================
 Package                 Arch         Version              Repository    Size
==============================================================================
Installing:
 python-setuptools       noarch       0.6c9-5.fc12         fedora       237 k

Transaction Summary
==============================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 237 k
Is this ok [y/N]: y
Downloading Packages:
python-setuptools-0.6c9-5.fc12.noarch.rpm              | 237 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : python-setuptools-0.6c9-5.fc12.noarch                  1/1 

Installed:
  python-setuptools.noarch 0:0.6c9-5.fc12                                     

Complete!
# coverage
Code coverage for Python.  Use 'coverage help' for help.
# 

There seems to be Requires missing in python-coverage .spec.

Version-Release number of selected component (if applicable):

# rpm -q python-coverage
python-coverage-3.2-1.fc12.i686

How reproducible:

Deterministic.

Steps to Reproduce:
1. Make sure python-setuptools is not installed.
2. Install python-coverage.
3. Run /usr/bin/coverage.
  
Actual results:

Traceback (most recent call last):
  File "/usr/bin/coverage", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

Expected results:

The python-setuptools installed with python-coverage and

Code coverage for Python.  Use 'coverage help' for help.

Additional info:

Comment 1 Dave Malcolm 2010-02-16 15:06:22 UTC
Sounds a dup of bug 556290; I believe this is fixed in:
  python-coverage-3.2-2.fc12

Comment 2 Dave Malcolm 2010-02-16 15:07:04 UTC

*** This bug has been marked as a duplicate of bug 556290 ***


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