Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Problems importing package because six is missing. #93

Open
rjavila opened this issue Mar 20, 2020 · 9 comments
Open

Problems importing package because six is missing. #93

rjavila opened this issue Mar 20, 2020 · 9 comments

Comments

@rjavila
Copy link

rjavila commented Mar 20, 2020

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
Copy link
Collaborator

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
Copy link
Author

rjavila commented Mar 22, 2020

Yes, I installed pyds9 from the AstroConda channel.

@ericmandel
Copy link
Owner

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

@DougBurke
Copy link
Collaborator

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

@ericmandel
Copy link
Owner

@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
Copy link
Collaborator

DougBurke commented Mar 23, 2020 via email

@ericmandel
Copy link
Owner

@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
Copy link

kslong commented Sep 20, 2020

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: hyperion-rt/hyperion#219

@DougBurke
Copy link
Collaborator

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.

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

No branches or pull requests

4 participants