gpt4 book ai didi

python - 类型错误 : setup() got multiple values for keyword argument 'packages'

转载 作者:行者123 更新时间:2023-12-01 05:29:47 25 4
gpt4 key购买 nike

当我根据 these instructions 运行以下命令时,此错误发生在第 31 行,如下所示。 。如何获取的多个值?

python setup.py config_fc --fcompiler=gnu95 \
--f77flags='-fdefault-real-8' \
--f90flags='-fdefault-real-8' build

.

from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
import os, sys

import sys

fflags= '-fdefault-real-8 -ffixed-form'

# TODO: Fix it so that these flags are default.

config = Configuration(
'glmnet',
parent_package=None,
top_path=None
)


f_sources = ['glmnet/glmnet.pyf','glmnet/glmnet.f']

config.add_extension(name='_glmnet',sources=f_sources)
config_dict = config.todict()
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(version='1.1-5',
description='Python wrappers for the GLMNET package',
author='David Warde-Farley',
author_email='dwf@cs.toronto.edu',
url='github.com/dwf/glmnet-python',
license='GPL2',
requires=['NumPy (>= 1.3)'],
packages=['glmnet'], ### LINE 31
**config_dict)

最佳答案

Configuration(package_name).to_dict() 结果已经包含packages=[package_name]条目。

通过将其包含在 setup() config_dict 映射中,提供 setup()关键字两次。您可以将其从 setup() 调用中删除(第 31 行):

setup(version='1.1-5',
description='Python wrappers for the GLMNET package',
author='David Warde-Farley',
author_email='dwf@cs.toronto.edu',
url='github.com/dwf/glmnet-python',
license='GPL2',
requires=['NumPy (>= 1.3)'],
**config_dict)

我看到该包的作者 added the packages line explicitly 4 years ago ;我强烈怀疑 NumPy 的行为已经改变。

您或许应该提交 another issue与该项目。

关于python - 类型错误 : setup() got multiple values for keyword argument 'packages' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20501646/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com