我有Windows8(不幸的是,我有幸拥有一台非常支持Linux的笔记本电脑,尝试了几种发行版。我安装了python2.7,还可以导入scipy和numpy。我已经从他们的站点安装了astropy和可执行文件,但是当我试图导入它时,我得到了下面的错误消息。在
Enthought Canopy Python 2.7.3 | 64-bit | (default, Jun 14 2013, 18:19:25) [MSC v
.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import astropy
Error in sys.excepthook:
Traceback (most recent call last):
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\logger.py", line 222, in _excepthook
self.error(message)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.12
62.win-x86_64\lib\logging\__init__.py", line 1166, in error
self._log(ERROR, msg, args, **kwargs)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.12
62.win-x86_64\lib\logging\__init__.py", line 1258, in _log
self.handle(record)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.12
62.win-x86_64\lib\logging\__init__.py", line 1268, in handle
self.callHandlers(record)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.12
62.win-x86_64\lib\logging\__init__.py", line 1308, in callHandlers
hdlr.handle(record)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.0.3.12
62.win-x86_64\lib\logging\__init__.py", line 748, in handle
self.emit(record)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\logger.py", line 339, in _stream_formatter
color_print(record.levelname, 'red', end='')
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\utils\console.py", line 230, in color_print
if isatty(file) and USE_COLOR():
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\config\configuration.py", line 336, in __call__
sec = get_config(self.module)
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\config\configuration.py", line 402, in get_config
from ..utils import find_current_module
SystemError: Parent module 'astropy' not loaded, cannot perform relative import
Original exception was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Omer\AppData\Local\Enthought\Canopy\User\lib\site-packages\astr
opy\__init__.py", line 136, in <module>
from .utils import _compiler
ImportError: DLL load failed: %1 is not a valid Win32 application.
>>>
有人能帮我把它安装好吗?在
看起来你用的是热情的天篷?尝试安装Anaconda Python发行版(https://store.continuum.io/cshop/anaconda/),因为它默认包含Astropy。在
相关问题 更多 >
编程相关推荐