0

I tried to use DEAP for Multi Objective PSO. So, I installed deap in my anaconda environment using pip install. and I found the deap in conda list. but I cannot import deap in python. Could you help me to solve this problem? I activated conda environment before install the package.

my default python path and deap library path is below.

'$which python' 
'/sw/model/SMD/conda2/envs/py2/bin/python'

'$whereis deap'
'/sw/model/SMD/conda2/envs/py2/lib/python2.7/site-packages/deap'

When I execute my file deap.py, I get the error below.

Traceback (most recent call last): File "deap.py", line 5, in from deap import base, creator, tools, algorithms

ImportError: cannot import name base

Emma
  • 27,428
  • 11
  • 44
  • 69
hakseung lee
  • 21
  • 1
  • 3
  • Did you activate the conda environment before running your code? Is `deap.py` your file, or from the DEAP package? Please edit your post to add information, and please format file paths and commands more readable. – Roland Weber Jun 29 '19 at 08:25
  • I activated conda environment before running the deap.py which is my file. – hakseung lee Jul 01 '19 at 05:07

0 Answers0