Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure trying to load ipyastpys #2

Open
keflavich opened this issue Oct 13, 2011 · 15 comments
Open

Failure trying to load ipyastpys #2

keflavich opened this issue Oct 13, 2011 · 15 comments

Comments

@keflavich
Copy link

When I try to load ipyastpys, I get the following error:
ImportError: Entry point ('console_scripts', 'ipython') not found
if I use ipython 0.11 or 0.12.

I'm not sure, but I think it may be related to the default location ipython >=0.11 looks in: it should be ~/.ipython/profile_default/ or similar, not ~/.ipython/

Here's the full traceback:
$ /Library/Frameworks/Python.framework/Versions/2.6/bin/ipyastpys
/Users/adam/repos/ets/etsproxy/enthought/init.py:7: DeprecationWarning: enthought namespace imports are deprecated
DeprecationWarning)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/bin/ipyastpys", line 5, in
pkg_resources.run_script('Astropysics==0.1.dev-r1117', 'ipyastpys')
File "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", line 489, in run_script
if insert:
File "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", line 1207, in run_script

File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Astropysics-0.1.dev_r1117-py2.6.egg/EGG-INFO/scripts/ipyastpys", line 139, in
sys.exit(load_entry_point('ipython', 'console_scripts', 'ipython')())
File "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", line 318, in load_entry_point
def get_metadata_lines(name):
File "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", line 2220, in load_entry_point
def as_requirement(self):
ImportError: Entry point ('console_scripts', 'ipython') not found

@eteq
Copy link
Owner

eteq commented Oct 17, 2011

hmm... The error looks like it is coming from not finding the entry point to the ipython console scripts rather than the profile. Does it work if you do "ipython --profile=astpys" ? That should basically be identical to the script...

@keflavich
Copy link
Author

Yes, actually- ipython --profile=astpys works fine, while ipyastpys
still does not.

On Mon, Oct 17, 2011 at 4:26 PM, Erik Tollerud
[email protected]
wrote:

hmm... The error looks like it is coming from not finding the entry point to the ipython console scripts rather than the profile. Does it work if you do "ipython --profile=astpys"  ?  That should basically be identical to the script...

Reply to this email directly or view it on GitHub:
#2 (comment)

@eteq
Copy link
Owner

eteq commented Oct 22, 2011

So how exactly did you install astropysics here? python setup.py install or python setup.py develop? Also, I made a small change to the repo that might fix this (although I don't think so)

@keflavich
Copy link
Author

I used python setup.py install. I also tried python setup.py develop
and that had the same result. The change did not fix the issue.

On Sat, Oct 22, 2011 at 12:54 AM, Erik Tollerud
[email protected]
wrote:

So how exactly did you install astropysics here?  python setup.py install or python setup.py develop?  Also, I made a small change to the repo that might fix this (although I don't think so)

Reply to this email directly or view it on GitHub:
#2 (comment)

Adam

@eteq
Copy link
Owner

eteq commented Oct 24, 2011

And did you run astpys-setup after the install? You might also try wiping your install directory and trying again...

I'm confused by your traceback here, because its referencing a file "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", and when I do the same thing it finds my installed version of pkg_resources in "/Library/Frameworks/Python.framework/..." ... do you have the setuptools or distribute packages installed on your system? And if so, did you install it before, or after ipython? (I'm not sure if this matters...)

FYI, though, if you just want it to work, "ipython --profile=astpys " does essentially the same thing as "ipyastpys"

@keflavich
Copy link
Author

On Mon, Oct 24, 2011 at 1:52 PM, Erik Tollerud
[email protected]
wrote:

And did you run astpys-setup after the install?  You might also try wiping your install directory and trying again...

Yes. And, tried that.

I'm confused by your traceback here, because its referencing a file "build/bdist.macosx-10.6-i386/egg/pkg_resources.py", and when I do the same thing it finds my installed version of pkg_resources in "/Library/Frameworks/Python.framework/..." ... do you have the setuptools or distribute packages installed on your system?  And if so, did you install it before, or after ipython? (I'm not sure if this matters...)

Interesting... I removed setuptools & reinstalled them from source,
and my traceback now points to
"build/bdist.macosx-10.6-x86_64/egg/pkg_resources.py". I'm pretty
sure I had originally installed it before ipython, but now after... I
don't really know what's going on here.

FYI, though, if you just want it to work, "ipython --profile=astpys " does essentially the same thing as "ipyastpys"

That's fine; I'm happy writing an alias if I want ipyastpys to work.
But, if you ever get a clue as to what was going on here, I'd like to
know.

@eteq
Copy link
Owner

eteq commented Oct 24, 2011

Hmm... have you tried installing distribute? setuptools is developing more and more compatibility problems because it's no longer maintained, while distribute is being actively developed, and includes all of the setuptools functionality. If installing distribute fixes the problem, that at least gives me a hint as to what I need to do to reproduce this issue...

@keflavich
Copy link
Author

On Mon, Oct 24, 2011 at 2:49 PM, Erik Tollerud
[email protected]
wrote:

Hmm... have you tried installing distribute?  setuptools is developing more and more compatibility problems because it's no longer maintained, while distribute is being actively developed, and includes all of the setuptools functionality.  If installing distribute fixes the problem, that at least gives me a hint as to what I need to do to reproduce this issue...

Thanks, I wasn't aware of the setuptools issues. My traceback
probably looks more like yours now:

$ ipyastpys
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/bin/ipyastpys",
line 5, in
pkg_resources.run_script('Astropysics==0.1.dev-r1120', 'ipyastpys')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 1235, in run_script
execfile(script_filename, namespace, namespace)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Astropysics-0.1.dev_r1120-py2.6.egg/EGG-INFO/scripts/ipyastpys",
line 139, in
sys.exit(load_entry_point('ipython', 'console_scripts', 'ipython')())
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 2278, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'ipython') not found

Adam

@eteq
Copy link
Owner

eteq commented Oct 24, 2011

Yes, that looks more like what I have... except that I don't get a traceback, because it works just fine for me, which is why this is so puzzling. What happens if you do:

import pkg_resources
print pkg_resources.load_entry_point('ipython','console_scripts','ipython')

Just from the python (or ipython) prompt? Does it give you a function or does it throw the same ImportError?

@keflavich
Copy link
Author

Same error:

print pkg_resources.load_entry_point('ipython','console_scripts','ipython')
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/distribute-0.6.24-py2.6.egg/pkg_resources.py",
line 2278, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'ipython') not found

Adam

@eteq
Copy link
Owner

eteq commented Oct 24, 2011

Hmm... did you install ipython from source? What happens if you re-install it, then try the above command?

And I'm assuming you're using ipython 0.11? If so, what happens if you do

from IPython.frontend.terminal.ipapp import launch_new_instance
launch_new_instance()

@keflavich
Copy link
Author

I've actually reinstalled ipython a couple times (all from source)
during testing of astropysics, and I did switch to 0.11. I just
reinstalled ipython again (though I didn't remove it first... I've had
issues with unclean ipy installs before) and ran into the same error.

launch_new_instance works fine - it loads up an ipython terminal.

Adam

@eteq
Copy link
Owner

eteq commented Oct 24, 2011

well that's just bizarre... as I said, it works fine for me... oh, is there any chance that somehow the ipyastpys script is somehow pointing to the wrong python? That is, if you have the system python (2.6 on Mac OS X) installed along side some other version, and ipyastpys is started with the system python while ipython is installed on some other version you installed, this is how it might manifest...

@keflavich
Copy link
Author

I had the same thought. Unfortunately, nope, no luck. I also checked
by running the commands in python, i.e.:

__requires__ = 'Astropysics==0.1.dev-r1120'
import pkg_resources
pkg_resources.run_script('Astropysics==0.1.dev-r1120', 'ipyastpys')

and again, same error.

On Mon, Oct 24, 2011 at 5:21 PM, Erik Tollerud
[email protected]
wrote:

well that's just bizarre... as I said, it works fine for me... oh, is there any chance that somehow the ipyastpys script is somehow pointing to the wrong python?  That is, if you have the system python (2.6 on Mac OS X) installed along side some other version, and ipyastpys is started with the system python while ipython is installed on some other version you installed, this is how it might manifest...

Reply to this email directly or view it on GitHub:
#2 (comment)

Adam

@eteq
Copy link
Owner

eteq commented Oct 25, 2011

Well this is quite strange... I'm pretty much out of ideas, especially given that I really can't figure out how to reproduce this.

One other thing to try: use virtualenv --distribute --no-site-packages <directoryname> to make a clean distribution, and then try installing ipython and astropysics there. That requires also installing numpy and scipy, though, which may be a big pain. It's the only way to really be sure there isn't some weird package conflict happening here.

Now we're seeing why there's so much interest in moving away from setuptools/distribute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants