Search code examples
pythonubuntu-14.04

how do I update PYTHONPATH from /usr/local/bin/python to /usr/bin/python


I am unable to use virt-manager, and I think it's because of where my python is located. When I run the virt-manager command I get: No module named libvirt even though I have libvirt installed. When I run /usr/bin/python /usr/share/virt-manager/virt-manager.py it works fine. The output from which python is /usr/local/bin/python. I've tried creating a ~/.bash_profile that contains this: export PYTHONPATH=$PYTHONPATH:/usr/bin/python but am still having the same problem. I'm sure there is a simple solution to this?


Solution

  • You can make a symbolic link, example:

    sudo mv /usr/local/bin/python python-old # example name
    sudo ln -s /usr/bin/python /usr/local/bin/python