I tried to install TPOT as per http://epistasislab.github.io/tpot/installing/
I had trouble installing DEAP, so I had installed setuptools==58. Both tpot and DEAP installed.
After installation, when I ran "import tpot", I get the following error:
Traceback (most recent call last):
File ~\AppData\Roaming\Python\Python310\site-packages\IPython\core\interactiveshell.py:3251 in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
Input In [1] in <module>
import tpot
File ~\AppData\Roaming\Python\Python310\site-packages\tpot\__init__.py:27 in <module>
from .tpot import TPOTClassifier, TPOTRegressor
File ~\AppData\Roaming\Python\Python310\site-packages\tpot\tpot.py:31 in <module>
from .base import TPOTBase
File ~\AppData\Roaming\Python\Python310\site-packages\tpot\base.py:46 in <module>
from deap import base, creator, tools, gp
File ~\AppData\Roaming\Python\Python310\site-packages\deap\base.py:192
raise TypeError, ("Both weights and assigned values must be a "
^
SyntaxError: invalid syntax
Uninstalled and reinstalled DEAP, setuptools, and tpot; no change
I am using Python 3.10.2 64-bit, with Visual Studio Code IDE on a Windows 10 machine. tpot version 0.11.7, deap version 1.3.1.
Any suggestions please?
There are two errors here.
tpotonly appears to be compatible with Python 3.7 (see the.travis.ymlbuild matrix)DEAPseems to have been designed for Python 2.6, with limited support for Python 3 using 2to3.From the DEAP README:
Someone reported the
SyntaxErroron 2021-01-14 (https://github.com/DEAP/deap/issues/537), so this has been a problem for ~2 years.