unable to launch magpie on OSX 10.9.3 #12

Closed
sirtimbly opened this Issue Jun 17, 2014 · 12 comments

Projects

None yet

5 participants

@sirtimbly

Looks like Sphinx is missing but pip says it's installed.

Traceback (most recent call last): File "/usr/local/bin/magpie", line 5, in <module> 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 <module> 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: Sphinx==1.2.2

@charlesthomas
Owner

I have recently gotten magpie running on 10.9.3 w/o issue.

How did you install it? Are you using virtualenvs? What happens if you try to install spinx manually? Are you using Python 2 or 3 (3 is not currently supported)?

@Erwyn
Contributor
Erwyn commented Jul 2, 2014

Could you run a

pip install magpie

and paste here full feedback?

@sirtimbly

I do not use virtual envs, Here's what happens when I do pip install magpie.

sudo pip install magpie Requirement already satisfied (use --upgrade to upgrade): magpie in /Library/Python/2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): Jinja2==2.7.2 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): MarkupSafe==0.21 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): Pygments==1.6 in /Library/Python/2.7/site-packages/Pygments-1.6-py2.7.egg (from magpie) Requirement already satisfied (use --upgrade to upgrade): Sphinx==1.2.2 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): argparse==1.2.1 in /Library/Python/2.7/site-packages/argparse-1.2.1-py2.7.egg (from magpie) Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname==3.4.0.2 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): docutils==0.11 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): filemagic==1.6 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): markdown2==2.2.1 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): py-bcrypt==0.4 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): pyPdf==1.13 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): sh==1.09 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): tornado==3.2 in /Library/Python/2.7/site-packages (from magpie) Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from magpie) Cleaning up....

@Erwyn
Contributor
Erwyn commented Jul 2, 2014

Looks like there is no problem of dependency…

Could you try to:

pip install Sphinx --upgrade
@sirtimbly

OK, hmm, says it's up to date.

Requirement already up-to-date: Sphinx in /Library/Python/2.7/site-packages Cleaning up...

@Erwyn
Contributor
Erwyn commented Jul 2, 2014

and now, after cleaning up do you still have the issue when issuing a:

magpie
@scott-r
scott-r commented Jul 3, 2014

I see exactly the same issue after installing on OSX 10.9.4.

/Library/Python/2.7/site-packages/sphinx/__init__.py says that it is version 1.2.2. And 'import sphinx' directly in python works fine.

@scott-r
scott-r commented Jul 4, 2014

I found a solution. Of all the dependencies magpie has, Sphinx is the only one installed from a wheel instead of an egg. Apparently, pkg_resources.py only works with egg-info metadata, not dist-info.

To solve the problem, go to https://pypi.python.org/pypi/Sphinx and download the source code for Sphinx. Extract the tar.gz file somewhere and then move the Sphinx.egg-info directory from the source tree to /Library/Python/2.7/site-packages/Sphinx-1.2.2.egg-info. This allows pkg_resources.py to find the metadata it needs to resolve the dependency.

@Erwyn
Contributor
Erwyn commented Jul 4, 2014

Great, let's see if it solves others issues.

@charlesthomas
Owner

sphinx is only needed for building magpie's documentation. Since most people will never actually do this, I've removed it from the requirements. Once I publish a new version, this issue should go away.

@Simulacrotron

I'm still seeing this issue. Do you have an eta for when the next version will be published?

@charlesthomas
Owner

I made the mistake of accepting some bad pull requests, and now I'm trying to sort out encoding issues. As soon as I can get that sorted out, I will release a new version.

If I can't fix it soon, I may try to release a rolled back version of the code that fixes this problem, but it might be even more trouble.

You could try downloading the gzip from here: https://pypi.python.org/pypi/magpie/0.0.7

Then edit the requirements.txt file to remove Sphinx, and then run python setup.py sdist and then pip install dist/magpie-0.0.7.tar.gz. That should create and install a build without Sphinx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment