Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid setting up an explicit python path on shogun #63

Open
gut opened this issue Jun 8, 2017 · 2 comments
Open

Avoid setting up an explicit python path on shogun #63

gut opened this issue Jun 8, 2017 · 2 comments

Comments

@gut
Copy link
Contributor

gut commented Jun 8, 2017

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.

@rcurtin
Copy link
Member

rcurtin commented Jun 8, 2017

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.

@gut
Copy link
Contributor Author

gut commented Jun 9, 2017

Ok, it looks promissing but I'm not a python/virtualenv expert on that matters. I'll see if I can contribute somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants