在Casa中安装astropy [英] Installation of astropy in casa

查看:149
本文介绍了在Casa中安装astropy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Mac上将astropy安装到CASA 4.3.1中.我正在此处进行操作.但是运行pip.main(['install', 'astropy', '--user'])之后,我得到:

I am trying to install astropy into CASA 4.3.1 on my Mac. I'm following the instructions found here. But after running pip.main(['install', 'astropy', '--user']), I get:

AttributeError: 'module' object has no attribute 'main'

还有其他人遇到过这个问题吗?

Has anyone else encountered this problem?

使用后

import pip._internal
pip._internal.main(['install', 'astropy', '--user'])

安装开始但由于错误而停止:

The installation starts but stops with the error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/

推荐答案

我找到了答案,我正在分享它,以防将来其他人遇到相同的问题.步骤如下.在遵循了我在问题中提到的过程之后,没有最后一步,就需要在终端中运行以下命令:

I found the answer and I'm sharing it in case anyone else has the same problem in the future. The steps are the following. After having followed the procedure I mentioned in the question, without the final step, one needs to run the following command in the terminal:

python -m pip install --upgrade pip setuptools wheel

然后打开casa和import pip._internal,最后运行pip._internal.main(['install', 'astropy', '--user']).

then open casa and import pip._internal and finally run pip._internal.main(['install', 'astropy', '--user']).

这篇关于在Casa中安装astropy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆