I am new to python packaging. My Command Line Interface (CLI) named virtdc modules has to be installed in /var/lib/virtdc. virtdc is the top folder structure


So my setup.py file is under virtdc. When I package this and download and install, it is installing in the default location (site-packages) under python. But my CLI has to be installed under /var/lib. my setup.py file is here.

Is there any way to make it installable to /var/lib by default but not through prefix or target option.

You can find my python package here

How can I install the package under /var/lib/virtdc instead of default location?


  • as far as installing package under /var/lib/virtdc is concerned, take a look at the --prefix option to setup.py – iruvar Dec 16 '14 at 22:12
  • I tried 'pip install -t /var/lib/ virtdc'. And it works. I want to make this to be installed in /var/lib by default – Dany Dec 18 '14 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.