DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.82k stars 1.13k forks source link

deap for python 3.10 #610

Open Edanflame opened 2 years ago

Edanflame commented 2 years ago

I am going to upgrade my python from 3.7 to 3.10 in windows and when I try to install deap 1.3.1, it reports error and does not work. Is the deap for python 3.10 on the schedule? thx.

fmder commented 2 years ago

You are right, it seems that the only cp10 wheel has been built for manylinux. I’ll look into it.

fmder commented 2 years ago

Ho, I think I tries a couple of months ago, lib_2to3 has been removed from 3.10 ...

Edanflame commented 2 years ago

Thank you for your efforts. It helps me a lot. I try to setup with deep-master, and error with 'use_2to3 is invalid', so I delete the use_2to3 in setup.py and it works. I make a pr https://github.com/DEAP/deap/pull/620 , and I don't know if it is right.

tvdboom commented 2 years ago

any update when a new version will be released that support 3.10?

Edanflame commented 2 years ago

https://github.com/DEAP/deap/pull/620 only solves the error during setup, but cannot solve the error during running. So I close it.

andreikitaitsev commented 2 years ago

For me the installation worked fine, but a similar error with 'use_2to3 is invalid' and syntax errors in raise statements occured when running the scripts. Downgrading the python interpreter version (<3.10) solved the problem.

Edanflame commented 2 years ago

To install deap 1.3.1 in python 3.10, you can degrade the setuptools to 57.0.0 and install with source code

mikhailsmilovic commented 2 years ago

To install deap 1.3.1 in python 3.10, you can degrade the setuptools to 57.0.0 and install with source code

Worked perfectly 💙

  1. pip install setuptools==57.0.0
  2. ✔️ Downloaded deap-1.3.1.tar.gz from https://pypi.org/project/deap/#files
  3. pip install deap-1.3.1.tar.gz
  4. (optional) pip install setuptools==61.2.0
meghkc commented 2 years ago

for python 3.10.4 downgrade setuptools to 58.0.0 and use code pip install deap it will install deap 1.3.1 perfectly but while importing base (it says invalid syntax error), importing tools,creator works fine are you facing the same please share.

aabmets commented 2 years ago

@Edanflame @fmder @tvdboom @andreikitaitsev @mikhailsmilovic @meghkc

I've created a Python 3.10 port of the DEAP library called DEAP-er. It's currently in beta, but you could check it out and provide feedback about any bugs.