You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to build deap from sources using Python 3 inside a freshly created virtualenv, setuptools will simply ignore to run 2to3 if it is not installed in this virtualenv (proof: https://github.com/pypa/setuptools/blob/master/setuptools/command/build_py.py#L14). The result is that deap is built as a Python 2 package that is incompatible with Python 3.
Steps to reproduce
Create a new Python 3 virtualenv pyenv virtualenv 3.5.5 deap_creator
Activate it pyenv activate deap_creator
Run pip freeze and see that 2to3 is not installed
Install deap python setup.py install
Start a Python console and type from deap import creator
Then try to create a new class using creator : creator.create("Foo", list)
See the Python 2 error: AttributeError: 'dict' object has no attribute 'iteritems'
Proposed solution 1
Specify 2to3 as a requirement in setup.py. But I think this is not what deap is used to because otherwise other needed packages would be listed there too e.g. numpy.
Proposed solution 2
Add in the README if one wants to build deap from sources using Python 3 then one must install 2to3 package before and run the following commands:
When I try to build deap from sources using Python 3 inside a freshly created virtualenv, setuptools will simply ignore to run 2to3 if it is not installed in this virtualenv (proof: https://github.com/pypa/setuptools/blob/master/setuptools/command/build_py.py#L14). The result is that deap is built as a Python 2 package that is incompatible with Python 3.
Steps to reproduce
pyenv virtualenv 3.5.5 deap_creator
pyenv activate deap_creator
pip freeze
and see that2to3
is not installedpython setup.py install
from deap import creator
creator.create("Foo", list)
AttributeError: 'dict' object has no attribute 'iteritems'
Proposed solution 1
Specify
2to3
as a requirement insetup.py
. But I think this is not what deap is used to because otherwise other needed packages would be listed there too e.g.numpy
.Proposed solution 2
Add in the README if one wants to build deap from sources using Python 3 then one must install 2to3 package before and run the following commands:
The text was updated successfully, but these errors were encountered: