我目前正在使用其中使用astropy的python程序包,但遇到一个错误,我自己在使用astropy时从未收到此错误:
File "<ipython-input-14-fe241c5d4a10>", line 1, in <module>
runfile('/Users/colbyostberg/GoogleDrive/Python/Python37/Pandexo_Runner.py', wdir='/Users/colbyostberg/GoogleDrive/Python/Python37')
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/colbyostberg/GoogleDrive/Python/Python37/Pandexo_Runner.py", line 9, in <module>
import pandexo.engine.justdoit as jdi # THIS IS THE HOLY GRAIL OF PANDEXO
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/pandexo/engine/justdoit.py", line 2, in <module>
from pandeia.engine.instrument_factory import InstrumentFactory
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/pandeia/engine/instrument_factory.py", line 5, in <module>
from .utils import recursive_subclasses, merge_data
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/pandeia/engine/utils.py", line 8, in <module>
import pysynphot as psyn
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/pysynphot/__init__.py", line 24, in <module>
from .spectrum import BlackBody, GaussianSource, FlatSpectrum # noqa
File "/Users/colbyostberg/anaconda3/lib/python3.7/site-packages/pysynphot/spectrum.py", line 15, in <module>
from astropy.io import fits as pyfits
File "/Users/colbyostberg/GoogleDrive/Python/Python37/astropy/__init__.py", line 289, in <module>
_initialize_astropy()
File "/Users/colbyostberg/GoogleDrive/Python/Python37/astropy/__init__.py", line 181, in _initialize_astropy
from .utils import _compiler
ImportError: cannot import name '_compiler' from 'astropy.utils' (/Users/colbyostberg/GoogleDrive/Python/Python37/astropy/utils/__init__.py)
我已尝试以多种方式卸载并重新安装astropy,但这没有帮助,并且我确保我的PYTHONPATH正确指向其中包含numpy的目录,但没有任何效果。
请帮助。