How can I update all python modul开发者_如何学Pythones I have installed on ubuntu?
Ubuntu's repositories usually contain up-to-date versions of Python modules (prefixed with python-
) and if you do an apt-get dist-upgrade
will update any that you've installed from the repos.
As for packages you may have installed with easy_install
, you could use distribute to upgrade them.
Alternatively, you can construct a list of packages you have installed with yolk, and pass the packages in the list from yolk -l
to easy_install
.
Here is a one click simple command to do so:
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs sudo pip install -U
Checkout setuptools (a/k/a "easy_install"), the classic way of doing it, or distribute, the new way to handle all your Python module installation needs.
精彩评论