Commcare-export error

Hi all. I tried running commcare-export --help on OSX and got the following
error:

$ commcare-export --help

Traceback (most recent call last):

File "/usr/local/bin/commcare-export", line 5, in

from pkg_resources import load_entry_point

File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py"
, line 2603, in

working_set.require(__requires__)

File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py"
, line 666, in require

needed = self.resolve(parse_requirements(requirements))

File
"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py"
, line 565, in resolve

raise DistributionNotFound(req)  # XXX put more info here

pkg_resources.DistributionNotFound: six

Any ideas what the cause might be?

Hi Brian,

It seems like a common problem on Mac OS X :

Are you running Maverick ?

The solution seems to be to update pip (the Python package installer) :

sudo easy_install -U pip

Charles

··· On 28/08/2014 12:38, bmcdonald@proximitydesigns.org wrote: > Hi all. I tried running commcare-export --help on OSX and got the > following error: > | > > > > > > > > > $ commcare-export--help > > > Traceback(most recent call last): > > > File"/usr/local/bin/commcare-export",line 5,in > > > frompkg_resources importload_entry_point > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > 2603,in > > > working_set.require(__requires__) > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > 666,inrequire > > > needed =self.resolve(parse_requirements(requirements)) > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > 565,inresolve > > > raiseDistributionNotFound(req)# XXX put more info here > > > pkg_resources.DistributionNotFound:six > > | > > Any ideas what the cause might be? > > -- > > --- > You received this message because you are subscribed to the Google > Groups "CommCare Developers" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to commcare-developers+unsubscribe@googlegroups.com > . > For more options, visit https://groups.google.com/d/optout.

--
Charles Flèche
mHealth advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org
+95 9 431 978 25
Skype: charles.fleche

Hi Charles,
I updated pip(which was working beforehand) but it still gives the same
error.
Yeah, Im on Mavericks.

··· On Thursday, August 28, 2014 12:24:53 PM UTC+6:30, Charles Flèche wrote: > > Hi Brian, > > It seems like a common problem on Mac OS X : > > > http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade > > > http://stackoverflow.com/questions/21151695/broken-easy-install-and-pip-after-upgrading-to-os-x-mavericks > > > http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade > > Are you running Maverick ? > > The solution seems to be to update pip (the Python package installer) : > > sudo easy_install -U pip > > Charles > > > > > On 28/08/2014 12:38, bmcd...@proximitydesigns.org wrote: > > Hi all. I tried running commcare-export --help on OSX and got the > > following error: > > | > > > > > > > > > > > > > > > > > > $ commcare-export--help > > > > > > Traceback(most recent call last): > > > > > > File"/usr/local/bin/commcare-export",line 5,in > > > > > > frompkg_resources importload_entry_point > > > > > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > > > 2603,in > > > > > > working_set.require(__requires__) > > > > > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > > > 666,inrequire > > > > > > needed =self.resolve(parse_requirements(requirements)) > > > > > > > File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line > > > 565,inresolve > > > > > > raiseDistributionNotFound(req)# XXX put more info here > > > > > > pkg_resources.DistributionNotFound:six > > > > | > > > > Any ideas what the cause might be? > > > > -- > > > > --- > > You received this message because you are subscribed to the Google > > Groups "CommCare Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to commcare-developers+unsubscribe@googlegroups.com > > > <mailto:commcare-developers+unsubscribe@googlegroups.com >. > > > For more options, visit https://groups.google.com/d/optout. > > -- > Charles Flèche > mHealth advisor > Télécoms Sans Frontières http://www.tsfi.org > Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > +95 9 431 978 25 > Skype: charles.fleche >

Hi Brian,

Are you using a virtualenv? If not, I recommend trying that. Here's the
steps I used to install it (use whatever appropriate method to create a
virtualenv if you don't have mkvirtualenv, i.e., virtualenvwrapper):

::~$ mkvirtualenv ccexp
New python executable in ccexp/bin/python
Installing setuptools, pip...done.
(ccexp)::~$ python --version
Python 2.7.6
(ccexp)::~$ pip install commcare-export
... snip ...
Successfully installed commcare-export alembic argparse jsonpath-rw
openpyxl python-dateutil requests simplejson six sqlalchemy Mako ply
decorator jdcal MarkupSafe
Cleaning up...
(ccexp)::~$ commcare-export --help
usage: Output a customized export of CommCareHQ data.

optional arguments:
-h, --help show this help message and exit
... snip ...

Another thing that might fix your issue would be to install six:

$ pip install "six==1.7.3"

Best,
Daniel

··· On Thursday, August 28, 2014 2:22:30 AM UTC-4, bmcd...@proximitydesigns.org wrote: > > Hi Charles, > I updated pip(which was working beforehand) but it still gives the same > error. > Yeah, Im on Mavericks. > > > On Thursday, August 28, 2014 12:24:53 PM UTC+6:30, Charles Flèche wrote: >> >> Hi Brian, >> >> It seems like a common problem on Mac OS X : >> >> >> http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade >> >> >> http://stackoverflow.com/questions/21151695/broken-easy-install-and-pip-after-upgrading-to-os-x-mavericks >> >> >> http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade >> >> Are you running Maverick ? >> >> The solution seems to be to update pip (the Python package installer) : >> >> sudo easy_install -U pip >> >> Charles >> >> >> >> >> On 28/08/2014 12:38, bmcd...@proximitydesigns.org wrote: >> > Hi all. I tried running commcare-export --help on OSX and got the >> > following error: >> > | >> > >> > >> > >> > >> > >> > >> > >> > >> > $ commcare-export--help >> > >> > >> > Traceback(most recent call last): >> > >> > >> > File"/usr/local/bin/commcare-export",line 5,in >> > >> > >> > frompkg_resources importload_entry_point >> > >> > >> > >> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >> >> > 2603,in >> > >> > >> > working_set.require(__requires__) >> > >> > >> > >> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >> >> > 666,inrequire >> > >> > >> > needed =self.resolve(parse_requirements(requirements)) >> > >> > >> > >> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >> >> > 565,inresolve >> > >> > >> > raiseDistributionNotFound(req)# XXX put more info here >> > >> > >> > pkg_resources.DistributionNotFound:six >> > >> > | >> > >> > Any ideas what the cause might be? >> > >> > -- >> > >> > --- >> > You received this message because you are subscribed to the Google >> > Groups "CommCare Developers" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an email to commcare-developers+unsubscribe@googlegroups.com >> > . >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> Charles Flèche >> mHealth advisor >> Télécoms Sans Frontières http://www.tsfi.org >> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org >> +95 9 431 978 25 >> Skype: charles.fleche >> >

Hi Daniel,

Using it with virtualenv worked perfectly. Cheers

··· On Thursday, August 28, 2014 8:58:56 PM UTC+6:30, Daniel Miller wrote: > > Hi Brian, > > Are you using a virtualenv? If not, I recommend trying that. Here's the > steps I used to install it (use whatever appropriate method to create a > virtualenv if you don't have mkvirtualenv, i.e., virtualenvwrapper): > > ::~$ mkvirtualenv ccexp > New python executable in ccexp/bin/python > Installing setuptools, pip...done. > (ccexp)::~$ python --version > Python 2.7.6 > (ccexp)::~$ pip install commcare-export > ... snip ... > Successfully installed commcare-export alembic argparse jsonpath-rw > openpyxl python-dateutil requests simplejson six sqlalchemy Mako ply > decorator jdcal MarkupSafe > Cleaning up... > (ccexp)::~$ commcare-export --help > usage: Output a customized export of CommCareHQ data. > > optional arguments: > -h, --help show this help message and exit > ... snip ... > > Another thing that might fix your issue would be to install six: > > $ pip install "six==1.7.3" > > Best, > Daniel > > > On Thursday, August 28, 2014 2:22:30 AM UTC-4, bmcd...@proximitydesigns.org wrote: >> >> Hi Charles, >> I updated pip(which was working beforehand) but it still gives the same >> error. >> Yeah, Im on Mavericks. >> >> >> On Thursday, August 28, 2014 12:24:53 PM UTC+6:30, Charles Flèche wrote: >>> >>> Hi Brian, >>> >>> It seems like a common problem on Mac OS X : >>> >>> >>> http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade >>> >>> >>> http://stackoverflow.com/questions/21151695/broken-easy-install-and-pip-after-upgrading-to-os-x-mavericks >>> >>> >>> http://stackoverflow.com/questions/11704379/python-pip-broken-after-os-x-10-8-upgrade >>> >>> Are you running Maverick ? >>> >>> The solution seems to be to update pip (the Python package installer) : >>> >>> sudo easy_install -U pip >>> >>> Charles >>> >>> >>> >>> >>> On 28/08/2014 12:38, bmcd...@proximitydesigns.org wrote: >>> > Hi all. I tried running commcare-export --help on OSX and got the >>> > following error: >>> > | >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > $ commcare-export--help >>> > >>> > >>> > Traceback(most recent call last): >>> > >>> > >>> > File"/usr/local/bin/commcare-export",line 5,in >>> > >>> > >>> > frompkg_resources importload_entry_point >>> > >>> > >>> > >>> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >>> >>> > 2603,in >>> > >>> > >>> > working_set.require(__requires__) >>> > >>> > >>> > >>> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >>> >>> > 666,inrequire >>> > >>> > >>> > needed =self.resolve(parse_requirements(requirements)) >>> > >>> > >>> > >>> File"/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py",line >>> >>> > 565,inresolve >>> > >>> > >>> > raiseDistributionNotFound(req)# XXX put more info here >>> > >>> > >>> > pkg_resources.DistributionNotFound:six >>> > >>> > | >>> > >>> > Any ideas what the cause might be? >>> > >>> > -- >>> > >>> > --- >>> > You received this message because you are subscribed to the Google >>> > Groups "CommCare Developers" group. >>> > To unsubscribe from this group and stop receiving emails from it, send >>> > an email to commcare-developers+unsubscribe@googlegroups.com >>> > . >>> > For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> Charles Flèche >>> mHealth advisor >>> Télécoms Sans Frontières http://www.tsfi.org >>> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org >>> +95 9 431 978 25 >>> Skype: charles.fleche >>> >>