2016-03-14 13 views
5

stavo cercando di installare hyperopt, ma ho ottenuto il seguente errore:pip installare hyperopt e hyperas falliscono

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/ 

ed ho ottenuto lo stesso errore quando intalling hyperas. Ma posso installare ggplot con successo usando il comando pip. Sto usando Ubuntu 14.04 e Python 3.5.

Grazie.

risposta

9

Questo è un bug in hyperopt. generator.next è stato rinominato in generator.__next__ che può essere richiamato con next(generator) in Python3.

Ecco il numero the PEP che specifica la modifica.

Sembra che sia stato risolto nel master ma non è mai stato rilasciato. Puoi installare da git (che significa anche github) nel modo seguente:

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

grazie mille! Per me va bene! –

Problemi correlati