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

wrong python dist-packages location #30

Open
mlg556 opened this issue Feb 5, 2022 · 2 comments
Open

wrong python dist-packages location #30

mlg556 opened this issue Feb 5, 2022 · 2 comments

Comments

@mlg556
Copy link

mlg556 commented Feb 5, 2022

I do not know if this is specific to my system (maybe it's broken), but sudo make install installs the python module to:
/usr/local/lib/python3/dist-packages/grdab, which is not in my python packages path (this results in a ModuleNotFoundError: No module named 'grdab'):

➜  ~ python3 -m site
sys.path = [
    '/usr/lib/python39.zip',
    '/usr/lib/python3.9',
    '/usr/lib/python3.9/lib-dynload',
    '/usr/local/lib/python3.9/dist-packages',
    '/usr/lib/python3/dist-packages',
    '/usr/lib/python3.9/dist-packages',
]

I think this is because in cmake, ${CMAKE_INSTALL_PREFIX} defaults to /usr/local, so the cmake_install.cmake files have the line:

file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python3/dist-packages/grdab" TYPE FILE FILES

again, this sounds like a problem on my system (Kubuntu 21.10 x86_64.), but maybe other people are having similar problems ?

@davidbullado
Copy link

I have the same problem. (ubuntu 20.04.3)

@nightf0rc3
Copy link

I had the same issue in MacOS (Monterey 12.1). Adding the Python Dir Flag -DGR_PYTHON_DIR= to cmake ../ solved this issue for me.
So in my case with a macports install of Python
cmake ../ -DGR_PYTHON_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages

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

3 participants