[GH-ISSUE #572] If using the virtualenv, the python cannot load the libvirt package. #433

Open
opened 2026-02-27 16:39:16 +03:00 by kerem · 2 comments
Owner

Originally created by @kensonman on GitHub (Aug 7, 2015).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/572

I'm tried in Ubuntu 14.04 LTS and Debian 7, if using virtualenv, the "manage.py runserver" command cannot load the libvirt package (even I had installed by "apt-get install python-libvirt").

The solution is add it manually:
add2virtualenv /usr/lib/python2.7/dist-packages

After that, everything work smoothly.

Originally created by @kensonman on GitHub (Aug 7, 2015). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/572 I'm tried in Ubuntu 14.04 LTS and Debian 7, if using virtualenv, the "manage.py runserver" command cannot load the libvirt package (even I had installed by "apt-get install python-libvirt"). The solution is add it manually: add2virtualenv /usr/lib/python2.7/dist-packages After that, everything work smoothly.
Author
Owner

@comzyh commented on GitHub (Jan 12, 2016):

you may try
virtualenv venv --system-site-package

<!-- gh-comment-id:170987264 --> @comzyh commented on GitHub (Jan 12, 2016): you may try `virtualenv venv --system-site-package`
Author
Owner

@absinthetized commented on GitHub (Mar 9, 2016):

Want to say that this suggestion solves the issue, please mark it as solved!
Among the various reasons why you want --system-site-packages is that libvirt-python version MUST match libvirt version on your systems.

<!-- gh-comment-id:194187303 --> @absinthetized commented on GitHub (Mar 9, 2016): Want to say that this suggestion solves the issue, please mark it as solved! Among the various reasons why you want --system-site-packages is that libvirt-python version MUST match libvirt version on your systems.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#433
No description provided.