Install Python Modules

1. using pip (for ubuntu: using "sudo apt-get install python3-pip" to install pip for python3):

    pip install mudulename

2. using sudo command in Linux in condition that pip doesn't work, for example the Tkinter module:

    sudo apt-get install python3-tk # for Python 3

    sudo apt-get install python-tk  #  for python 2

3. remove Django using "sudo pip3 uninstall django"

4. when using pip3 to install or unstall a module, "sudo" must be added before "pip3"

5. when in a virtual environment, "sudo" is not needed.

Reason:

    "you cannot install this library using pip, as pip is only designed to install pure python packages. By the way you would not have the sufficient rights to install the library. So you need to ask your superuser for help."

 

Reference Link:

1. https://packaging.python.org/en/latest/install_requirements_linux/#installing-pip-setuptools-wheel-with-linux-package-managers

2. http://askubuntu.com/questions/505141/unable-to-install-import-tkinter

 

posted @ 2016-03-06 16:33  bajunma123  阅读(245)  评论(0编辑  收藏  举报