How to fix Python error while compiling kdebase

Some days back, while compiling kdebase, I faced the following errors-
 

— Installing: /usr/lib/python2.6/dist-packages/PyKDE4/plasmascript.py
CMake Error at plasma/generic/scriptengines/python/cmake_install.cmake:60 (FILE):
file INSTALL cannot copy file
“/home/kde-devel/kde/src/KDE/kdebase/workspace/plasma/generic/scriptengines/python/plasmascript.py”
to “/usr/lib/python2.6/dist-packages/PyKDE4/plasmascript.py”.


Thanks for Patrick Aljord for reporting the solution which is as follows-

We've to pass -DPYTHON_SITE_PACKAGES_DIR:PATH=/path/where/you/want/to/install to cmake when building kdebase.

If using Python 2.6, one can pass ~/.local/lib/python2.6/site-packages as the path, as it will be automatically added to the Python path when the interpreter is run.


So, if you are using cmakekde script and don't know how to do the above, try the following commands-

  • cb KDE/kdebase
  • cmake ../../../src/KDE/kdebase/ -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DPYTHON_SITE_PACKAGES_DIR:PATH=~/.local/lib/python2.6/site-packages
  • make install

Hope this helps :)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s