pip安装hyperopt和hyperas fai

2024-09-30 00:31:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图安装hyperopt,但出现以下错误:

Collecting hyperopt
Using cached hyperopt-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
DEBUG:root:distribute_setup.py not found, defaulting to system setuptools
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 119, in <module>
    if package_data is None: package_data = find_package_data(packages)
  File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 102, in find_package_data
    for subdir in find_subdirectories(package):
  File "/tmp/pip-build-gmhldfe7/hyperopt/setup.py", line 73, in find_subdirectories
    subdirectories = os.walk(package_to_path(package)).next()[1]
AttributeError: 'generator' object has no attribute 'next'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gmhldfe7/hyperopt/

我在输入hyperas时也犯了同样的错误。但是我可以使用pip命令成功安装ggplot。我使用的是Ubuntu14.04和Python3.5。在

谢谢。在


Tags: pipinpybuildpackagedata错误setup
1条回答
网友
1楼 · 发布于 2024-09-30 00:31:54

这是hyperopt中的一个错误。generator.next被重命名为generator.__next__,可以用Python3中的next(generator)调用它。在

这里是the PEP详细说明的变化。在

看起来它在主人身上被修复了,但从未发布过。您可以通过执行以下操作从git安装(也就是github):

pip install git+https://github.com/hyperopt/hyperopt.git

相关问题 更多 >

    热门问题