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

astropy.extern no longer packages six with it #219

Closed
dnarayanan opened this issue Dec 18, 2019 · 11 comments
Closed

astropy.extern no longer packages six with it #219

dnarayanan opened this issue Dec 18, 2019 · 11 comments

Comments

@dnarayanan
Copy link

so this fails:

  File "/home/desika.narayanan/miniconda3/envs/pd4env/lib/python3.6/site-packages/hyperion/model/model.py", line 12, in <module>
    from astropy.extern import six
ImportError: cannot import name 'six'

easy fix in code to just do an import six but i don't know where to have hyperion automatically download six and install it in both the source and conda package in order to issue a pull request.

@saangel
Copy link

saangel commented Feb 3, 2020

Yup, encountered the same when importing aplpy. Had to manually modify several packages to import six directly

@battersbot
Copy link

same! (with importing aplpy)

See related issue (and the fix that worked for me) here: aplpy/aplpy#443

@dnarayanan
Copy link
Author

@lmowla found that these are the scripts that have to be modified:

alpha_disk.py
ambient_medium.py
bipolar_cavity.py
conf_files.py
dust_type.py
filter.py
flared_dis.py
image.py
model_output.py
model.py
power_law_envelope.py
sed.py
ulrich_envelope.py
validator.py

@astrofrog
Copy link
Contributor

Fixed by @jwise77 in #220

tallamjr added a commit to LSSTDESC/snmachine that referenced this issue May 14, 2020
Error:
    ImportError while importing test module '/home/vsts/work/1/s/test/snclassifier_test.py'.
    Hint: make sure your test modules/packages have valid Python names.
    Traceback:
    test/snclassifier_test.py:4: in <module>
        from snmachine import sndata, snfeatures, snclassifier, example_data
    ../../../miniconda/envs/snmachine/lib/python3.7/site-packages/snmachine/sndata.py:21: in <module>
        import sncosmo
    ../../../miniconda/envs/snmachine/lib/python3.7/site-packages/sncosmo/__init__.py:138: in <module>
        from .bandpasses import *
    ../../../miniconda/envs/snmachine/lib/python3.7/site-packages/sncosmo/bandpasses.py:11: in <module>
        from ._registry import Registry
    ../../../miniconda/envs/snmachine/lib/python3.7/site-packages/sncosmo/_registry.py:5: in <module>

        from astropy.extern import six
    E   ImportError: cannot import name 'six' from 'astropy.extern'

astropy.extern no longer packages six with it. sncosmo v2.1.0 removed
all references to six:

    v2.1.0 (2020-02-25)
    ===================

    - Add ZTF transmission functions

    - Bugfixes

      - Corrected pyproject.toml; should help cases where the wrong numpy
        version was being installed.

      - Remove all references to the six package

      - Fix accidental mutation of ``bounds`` inputs in ``fit_lc`` and
        ``mcmc_lc``.

This upgrade should resolve this issue

REF:

    - hyperion-rt/hyperion#219
    - dnarayanan/powderday#34
    - aplpy/aplpy#443

	modified:   environment.yml
@dnarayanan
Copy link
Author

this issue isn't updated in the conda installation - would it be possible to rebuild the conda install quickly?

@privong
Copy link

privong commented Aug 13, 2020

Seconding the conda package update request. I'm still getting the same error from a version installed today via conda.

@dnarayanan
Copy link
Author

would it be possible to get the conda install updated?

@astrofrog
Copy link
Contributor

I’ll try and take a look shortly!

@dnarayanan
Copy link
Author

thanks!

@dyasutomo
Copy link

FYI, I still have this issue with conda installation of astropy.

@xnaxe29
Copy link

xnaxe29 commented Jul 26, 2021

Me too. I am still facing this problem with conda installation Python 3.6.13, conda 4.10.3, astropy 4.0.2

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

7 participants