benchmarks
benchmarks copied to clipboard
Avoid setting up an explicit python path on shogun
On shogun install file, when the user is using, e.g: virtualenv, this kind of CMAKE configuration will override the users configuration for python environment.
Is it really necessary? In my case, the system-wide python didn't have numpy, but my active virtualenv had and it was not finding it. By removing the definition of PYTHON_INCLUDE_DIR
, PYTHON_EXECUTABLE:FILEPATH
and PYTHON_PACKAGES_PATH
variables it worked as expected.
I see what you mean, but there are a couple intricacies. These install scripts are meant to completely assemble the Shogun packages locally, so at the very least we have to set PYTHON_PACKAGES_PATH
to properly refer to ../../lib/python3.5/dist-packages/.
The PYTHON_INCLUDE_DIR
and PYTHON_EXECUTABLE
variables were set so that on our benchmarking systems, they properly use Python 3.5, and so that the correct include directory is used (it was not otherwise). But you are right, that does not respect either virtualenv setups or custom Python installations. If you'd like to contribute a patch to handle virtualenvs I'd be happy to review and merge it in, but currently I don't see an easy way to ensure that we get the proper includes and use the proper Python version.
Ok, it looks promissing but I'm not a python/virtualenv expert on that matters. I'll see if I can contribute somehow.