Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error with Python 2 #17

Closed
rhiever opened this issue Nov 15, 2015 · 2 comments
Closed

Installation error with Python 2 #17

rhiever opened this issue Nov 15, 2015 · 2 comments
Assignees
Labels

Comments

@rhiever
Copy link
Contributor

rhiever commented Nov 15, 2015

[pete@dakota ~]$ pip install tpot
Collecting tpot
  Downloading TPOT-0.1.2.tar.gz (165kB)
    100% |████████████████████████████████| 167kB 811kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/c3/bhnfltk57zb_fs68gy3mcr300000gn/T/pip-build-be0XTk/tpot/setup.py", line 18, in <module>
        package_version = calculate_version()
      File "/private/var/folders/c3/bhnfltk57zb_fs68gy3mcr300000gn/T/pip-build-be0XTk/tpot/setup.py", line 13, in calculate_version
        version = next(filter(lambda x: '__version__' in x, initpy)).split('\'')[1]
    TypeError: list object is not an iterator

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/c3/bhnfltk57zb_fs68gy3mcr300000gn/T/pip-build-be0XTk/tpot

Probably because Python 3 treats many lists as iterators by default and Python 2 doesn't.

@rhiever rhiever added the bug label Nov 15, 2015
@rhiever rhiever self-assigned this Nov 15, 2015
@rasbt
Copy link
Contributor

rasbt commented Nov 16, 2015

Hm, I don't quite understand!? As far as I know, lists are iteratable in both Python 2 and 3. The only difference I could think if is range where range in Python 3 is like xrange in Python 2. In contrast to Python 2's range, the Python 3 range doesn't create a list but is rather like a generator ...
Or that next in Python 2 is a method rather than a function such as in Python 3. Anyway, seems that you already fixed that :).

@rhiever
Copy link
Contributor Author

rhiever commented Nov 16, 2015

I suppose I meant that the resulting lists from functions like filter() are returned as iterators. lists themselves are treated the same of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants