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

Installation without admin rights #22

Open
mehrhardt opened this issue Jul 14, 2017 · 5 comments
Open

Installation without admin rights #22

mehrhardt opened this issue Jul 14, 2017 · 5 comments

Comments

@mehrhardt
Copy link

I have been trying to install odlcuda without admin rights. I have changed the "CMAKE_INSTALL_PREFIX" folder to a folder where I do have write access. This approach worked well to install other software packages. However, odlcuda seems to ignore this path and tries to install it into the default path

/usr/local/lib/python2.7/dist-packages/

instead.

I tried two options how to change the installation path, all of which should work according to some forums, but none does here.

  • cmake -DCMAKE_INSTALL_PREFIX=~/.local/lib/python2.7/site-packages ../
  • make DESTDIR=~/.local/lib/python2.7/site-packages pyinstall

Any ideas of what is going on here?

@adler-j
Copy link
Member

adler-j commented Jul 14, 2017

The problem is likely this line which always tries to perform a SUDO style install. You can fix that by adding --user at the end of it, see more info here: https://docs.python.org/2/install/index.html

Can you see if that works?

@adler-j
Copy link
Member

adler-j commented Jul 14, 2017

If that works for you I'll make a more long-term stable solution.

@mehrhardt
Copy link
Author

Great, so changing the file to:

...
endforeach()

add_custom_command(TARGET ${INSTALL_LIB} COMMAND cd ${TARGET_PY} && ${PYTHON_EXECUTABLE} setup.py install --user)

add_dependencies(${INSTALL_LIB} ${PYTHON_LIBS})
...

did the trick. I haven't tested the code yet, but I can install it :)

@mehrhardt
Copy link
Author

I am not sure if I had to but I did:

cmake -DCMAKE_INSTALL_PREFIX=~/.local/lib/python2.7/site-packages ../

before

@mehrhardt
Copy link
Author

Is this now implemented so that this issue can be closed, @adler-j ?

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