好的。因此,我正在研究一个基于Python 2.7的软件包,名为starkit。我正在使用以下命令进行安装:
curl -O https://raw.githubusercontent.com/starkit/starkit/master/starkit_env27.yml
# create env
conda env create --file starkit_env27.yml -n starkit
# activate
source activate starkit
# get starkit
git clone https://github.com/starkit/starkit
cd starkit
# install
python setup.py install
当我运行python setup命令时,出现以下错误:
Traceback (most recent call last):
File "setup.py", line 65, in <module>
get_debug_option(PACKAGENAME))
File "/Users/97amarnathk/Documents/starkit/astropy_helpers/astropy_helpers/setup_helpers.py", line 125, in get_debug_option
if any(cmd in dist.commands for cmd in ['build', 'build_ext']):
File "/Users/97amarnathk/Documents/starkit/astropy_helpers/astropy_helpers/setup_helpers.py", line 125, in <genexpr>
if any(cmd in dist.commands for cmd in ['build', 'build_ext']):
AttributeError: Distribution instance has no attribute 'commands'
但是当我再次执行python setup.py install
时,它会完美运行。我找不到为什么在第一次尝试时没有安装该软件包?
无论底层计算机如何,都会发生这种情况。当我将此存储库克隆到其他位置时,第一次尝试会发生相同的错误,而第二次却没有。为什么?