ericmandel / pyds9

Python connection to SAOimage DS9 via XPA
76 stars 41 forks source link

Problems importing package because `six` is missing. #93

Open rjavila opened 4 years ago

rjavila commented 4 years ago

Hi all. I'm having trouble importing pds9 because of some dependencies. The version I have tries to import six even though I see that you have removed that from the latest version of the code. Here's the traceback:

`In [1]: import pyds9

ImportError Traceback (most recent call last)

in ----> 1 import pyds9 ~/miniconda3/envs/scienv37/lib/python3.7/site-packages/pyds9/__init__.py in 18 # For egg_info test builds to pass, put package imports here. 19 if not _ASTROPY_SETUP_: ---> 20 from .pyds9 import * ~/miniconda3/envs/scienv37/lib/python3.7/site-packages/pyds9/pyds9.py in 27 from . import xpa 28 ---> 29 from astropy.extern import six 30 from astropy.extern.six import BytesIO 31 from astropy.io import fits ImportError: cannot import name 'six' from 'astropy.extern' (/Users//miniconda3/envs/scienv37/lib/python3.7/site-packages/astropy/extern/__init__.py)` I'm now unsure if I have the latest version or not. I installed using astroconda. `conda list pyds9 # packages in environment at /Users/roberto/miniconda3/envs/scienv37: # # Name Version Build Channel pyds9 1.9.0.dev145+gc1bf67a py37_2 http://ssb.stsci.edu/astroconda` Can anyone help me figure this out?
DougBurke commented 4 years ago

I don't have much time for pyds9, so excuse the brevity. It looks like you've installed pyds9 from the astroconda site? If so then I have no idea what version they are using (and don't have the time to track it down).

Or did you install from github?

rjavila commented 4 years ago

Yes, I installed pyds9 from the AstroConda channel.

ericmandel commented 4 years ago

Please try installing from github: https://github.com/ericmandel/pyds9

DougBurke commented 4 years ago

@ericmandel - we should perhaps look at doing a release soon.

ericmandel commented 4 years ago

@DougBurke Sure ... in my naive world that would just mean making a tagged release on github, but this current issue seems to indicate that pyds9 is updated elsewhere in the Pythoniverse. So (once today's suggested PR is merged if/as needed) this is more or less your call regarding conda etc.

DougBurke commented 4 years ago

I'd like to find some time to review what's been changed since the last release (check it makes sense). The updates in conda-land can be left to whoever does them. There is the issue of a release to pypi as https://pypi.org/project/pyds9/ is "owned" by xcthulhu

Doug

On Mon, Mar 23, 2020 at 11:37 AM Eric Mandel notifications@github.com wrote:

@DougBurke https://github.com/DougBurke Sure ... in my naive world that would just mean making a tagged release on github, but this current issue seems to indicate that pyds9 is updated elsewhere in the Pythoniverse. So (once today's suggested PR is merged if/as needed) this is more or less your call regarding conda etc.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ericmandel/pyds9/issues/93#issuecomment-602679816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABW27QGTBR7PRBPPCHDEMLRI5633ANCNFSM4LQS6YXA .

ericmandel commented 4 years ago

@DougBurke sigh ... I didn't even know about pypi ... I'm sorry this is such a mess, I haven't paid much attention to it over the last few years, other than dealing with xpa-specific questions ...

kslong commented 3 years ago

The problem is that six has now been removed from astropy.extern, presumably because it exists elsewhere, for the current astroconda release, these changes seem to fix the problem.

# from astropy.extern import six
# from astropy.extern.six import BytesIO
import six
from six import BytesIO

There is a a now closed related issue for another package that I found: https://github.com/hyperion-rt/hyperion/issues/219

DougBurke commented 3 years ago

If I remember correctly it's a fixed issue, but we need to do a release. Unfortunately due to health reasons I am not able to spend any time on this un-paid job at the moment.