jobovy / apogee

Tools for dealing with APOGEE data
BSD 3-Clause "New" or "Revised" License
43 stars 25 forks source link

Can't use isomodel with python3 #39

Closed aburgasser closed 8 years ago

aburgasser commented 8 years ago

in ipython3:

In [1]: from apogee.samples.rc import rcmodel ...: rc= rcmodel(Z=0.02) ...:

ImportError Traceback (most recent call last)

in () ----> 1 from apogee.samples.rc import rcmodel 2 rc= rcmodel(Z=0.02) /Users/adam/projects/FAST/apogee/apogee/samples/__init__.py in () ----> 1 from isomodel import * ImportError: No module named 'isomodel' in python 2, it can find isomodel, but I get a different (perhaps personal installation) problem: >>> rc= rcmodel(Z=0.02) Traceback (most recent call last): File "", line 1, in File "/Users/adam/projects/FAST/apogee/apogee/samples/rc.py", line 521, in __init__ eta=eta) File "/Users/adam/projects/FAST/apogee/apogee/samples/isomodel.py", line 90, in __init__ p= isodist.PadovaIsochrone(Z=Zs,parsec=parsec,eta=eta) File "//anaconda/lib/python2.7/site-packages/isodist-1.-py2.7.egg/isodist/PadovaIsochrone.py", line 104, in __init__ parsec=parsec)) File "//anaconda/lib/python2.7/site-packages/isodist-1.-py2.7.egg/isodist/PadovaIsochrone.py", line 178, in read_padova_isochrone file= gzip.open(name,'r') File "//anaconda/lib/python2.7/gzip.py", line 34, in open return GzipFile(filename, mode, compresslevel) File "//anaconda/lib/python2.7/gzip.py", line 94, in __init__ fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb') IOError: [Errno 2] No such file or directory: '/anaconda/lib/python2.7/site-packages/isodist-1.-py2.7.egg/isodist/../data/parsec-2mass-spitzer-wise/parsec-2mass-spitzer-wise-Z-0.0195.dat.gz' I did check that isodist is up to date.
jobovy commented 8 years ago

Should be fixed now (although there might be other similar issues...). You will also have to re-install isodist from the GitHub source, because it had similar issues.