mhwombat mhwombat - 1 year ago 40
Python Question

Can't find "six", but it's installed

I have

installed (even reinstalled it).

$ pip show six
Name: six
Version: 1.7.3
Location: /usr/lib/python2.6/site-packages

But when I try to run
, it can't find it.

$ csvcut -n monster.csv
Traceback (most recent call last):
File "/usr/bin/csvcut", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/", line 2655, in <module>
File "/usr/lib/python2.6/site-packages/", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: six>=1.6.1

Here's the relevant but of

# EASY-INSTALL-ENTRY-SCRIPT: 'csvkit==0.8.0','console_scripts','csvcut'
__requires__ = 'csvkit==0.8.0'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
load_entry_point('csvkit==0.8.0', 'console_scripts', 'csvcut')()

This is on CentOS.

Answer Source

Uninstalling and reinstalling six using pip didn't work

sudo pip uninstall six
sudo pip install six

However, I was able to solve the problem using easy_install:

easy_install --upgrade six