{"action":"opened","issue":{"url":"https://api.github.com/repos/sympy/csympy/issues/393","labels_url":"https://api.github.com/repos/sympy/csympy/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/sympy/csympy/issues/393/comments","events_url":"https://api.github.com/repos/sympy/csympy/issues/393/events","html_url":"https://github.com/sympy/csympy/issues/393","id":56551669,"number":393,"title":"Python install prefix confusion","user":{"login":"certik","id":20568,"avatar_url":"https://avatars.githubusercontent.com/u/20568?v=3","gravatar_id":"","url":"https://api.github.com/users/certik","html_url":"https://github.com/certik","followers_url":"https://api.github.com/users/certik/followers","following_url":"https://api.github.com/users/certik/following{/other_user}","gists_url":"https://api.github.com/users/certik/gists{/gist_id}","starred_url":"https://api.github.com/users/certik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/certik/subscriptions","organizations_url":"https://api.github.com/users/certik/orgs","repos_url":"https://api.github.com/users/certik/repos","events_url":"https://api.github.com/users/certik/events{/privacy}","received_events_url":"https://api.github.com/users/certik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sympy/csympy/labels/code%20quality%20/%20build%20system","name":"code quality / build system","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-04T16:39:10Z","updated_at":"2015-02-04T16:39:10Z","closed_at":null,"body":"When you install csympy like this, you get an error:\r\n```\r\n$ CC=gcc CXX=g++ cmake -DCOMMON_DIR=$HASHSTACK -DWITH_PYTHON=yes -DCMAKE_INSTALL_PREFIX:PATH=\"some_dir\" .\r\n...\r\nInstallation prefix: some_dir\r\n...\r\nPython install path: /home/certik/repos/hashstack/default/lib/python2.7/site-packages\r\n...\r\n-- Installing: /home/certik/repos/csympy/some_dir/include/cwrapper.h\r\n-- Installing: /home/certik/repos/csympy/some_dir/include/csympy_config.h\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/libteuchos.a\r\nCMake Error at csympy/cmake_install.cmake:44 (FILE):\r\nfile cannot create directory:\r\n/home/certik/repos/hashstack/default/lib/python2.7/site-packages/csympy.\r\nMaybe need administrative privileges.\r\nCall Stack (most recent call first):\r\ncmake_install.cmake:39 (INCLUDE) \r\n```\r\nFull log here: https://gist.github.com/certik/dad5626bebf708d6d2c7\r\n\r\nAs you can see the problem is that the \"Python install path\" (`PYTHON_INSTALL_PATH` variable) is wrong. It can be fixed like this:\r\n```\r\n$ CC=gcc CXX=g++ cmake -DCOMMON_DIR=$HASHSTACK -DWITH_PYTHON=yes -DCMAKE_INSTALL_PREFIX:PATH=\"some_dir\" -DPYTHON_INSTALL_PATH=\"lib/python2.7/site-packages\" .\r\n...\r\nInstallation prefix: some_dir\r\n...\r\nPython install path: lib/python2.7/site-packages\r\n...\r\n-- Installing: /home/certik/repos/csympy/some_dir/include/cwrapper.h\r\n-- Installing: /home/certik/repos/csympy/some_dir/include/csympy_config.h\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/libteuchos.a\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/python2.7/site-packages/csympy/__init__.py\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/python2.7/site-packages/csympy/utilities.py\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/python2.7/site-packages/csympy/lib/csympy_wrapper.so\r\n-- Removed runtime path from \"some_dir/lib/python2.7/site-packages/csympy/lib/csympy_wrapper.so\"\r\n-- Installing: /home/certik/repos/csympy/some_dir/lib/python2.7/site-packages/csympy/lib/__init__.py\r\n```\r\nFull log: https://gist.github.com/certik/971bbca783c097d7e6e0\r\n\r\n\r\nBut this is confusing. By default, the `PYTHON_INSTALL_PATH` should be automatically set to the right thing, so that the user can just control where to install using `CMAKE_INSTALL_PREFIX`, only if he or she wants to install the Python wrappers into a non-standard location, then `PYTHON_INSTALL_PATH` can be set directly to something else."}}