2016-03-14 19 views
5

Tôi đã cố gắng để cài đặt hyperopt, nhưng tôi đã nhận được lỗi sau:pips cài đặt hyperopt và hyperas thất bại

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/ 

Và tôi đã nhận lỗi tương tự khi intalling hyperas. Nhưng tôi có thể cài đặt ggplot thành công bằng cách sử dụng lệnh pip. Tôi đang sử dụng Ubuntu 14.04 và Python 3.5.

Cảm ơn.

Trả lời

9

Đây là lỗi trong hyperopt. generator.next đã được đổi tên thành generator.__next__ có thể được gọi với next(generator) bằng Python3.

Đây là the PEP nêu chi tiết thay đổi.

Có vẻ như nó đã được sửa trong bản gốc nhưng không bao giờ được phát hành. Bạn có thể cài đặt từ git (có nghĩa là github) bằng cách thực hiện như sau:

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

cảm ơn rất nhiều! Nó ổn với tôi! –

Các vấn đề liên quan