DEAP / deap

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

Deap install C compile fail - WSL #283

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm trying to install deap on a venv on WSL (Ubutnu 16.04), with build essential, python-dev, Python 3.5 and gcc 5.4 and the host machine has VS2017 and 2015 build tools installed. No matter what I try (and I've run through the existing proposed solutions on this git page) I still get: ../_hypervolume/pyhv.py:33: ImportWarning: Falling back to the python version of hypervolume module. Expect this to be very slow.

Deap sound like it has some really interesting capabilities, ones that are very relevant for my research, but as such this seemingly simple issue is rendering it unusable - is it literally that the installing env has to mimic in every way the env the package was created on? If so what are the specs I need to create to get this package to work?

I've tried using both ConEmu and Command Prompt as the WSL terminal (both as user and admin, just in case there was a funky windows permissions issue going on behind the scenes), interestingly the --verbose tells me deap was installed successfully, but it's clearly getting false information as when I try and call a library I get the hypervolume error above.

fmder commented 6 years ago

This warning is only relevant if your are trying to use hypervolume. You get the warning only because it tries to load every modules on import. I've fixed this in commit 42162f40.

Have your installed python3-dev?

ghost commented 6 years ago

Yup, Python3-dev is installed, thanks for committing a fix, I'll ignore the warning.

fmder commented 6 years ago

I don't have access to WSL but this is generaly because pip cannot find your compiler.

ghost commented 6 years ago

That's interesting, python3-dev should stop that, and I don't get "WARNING: The C extensions could not be compiled, " so nothing is setting off the setup.py warnings.

I've also since checked on my macOS (HS) venv, and deap builds without complaint and commands such as 'from deep import gp' do not raise a hypervolume warning, so everything works fine on macOS, think the issue I flagged may be something to do with WSL.