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

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

时间: 2024-11-08 09:15:33

Install Python Modules的相关文章

解决yum升级的问题“There was a problem importing one of the Python modules”

yum命令升级的时候,报出这个错误. There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named yum Please install a package which provides this module, or verify that the module is installed cor

install python+twisted+mysqldb+nginx+uwsgi on mac

一. install python 1) check install or not 在mac终端输入命令:which python 即可查看python的路径 2)未安装时,手动下载安装包 地址:https://www.python.org/downloads/ 选择下载   Mac OS X 64-bit/32-bit installer 安装 二. install twisted 1) check install or not 在mac终端输入命令:$ python Python 2.7.1

AIX 7.1 install python

环境AIX7.1   安装python-2.6.2  因为网上很多安装文档,所以并没有细挑版本,因为我觉得python2.6 可能相对保守一些,至少之前用到的版本是这个,所以此处依然选择熟悉的版本. 废话不多说,直接下载这3个安装包. http://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/python/python-2.6.2-2.aix6.1.ppc.rpm ftp://ftp.software.ibm.com/aix

How to install Python 2.7 and Python 3.3 on CentOS

In this guide I will show you how to install Python 2.7 and 3.3 on CentOS 6. The examples below are for Python 2.7.6 and Python 3.3.5, but the procedure is the same for any modern version of Python including the upcoming Python 3.4.0. I make regular

install Python 2.7 and Python 3.3 on CentOS 6

来自:http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/ In this guide I will show you how to install Python 2.7 and 3.3 on CentOS 6. The examples below are for Python 2.7.6 and Python 3.3.5, but the procedure is the same for any modern

Python Modules and Packages – An Introduction

This article explores Python modules and Python packages, two mechanisms that facilitate modular programming. Modular programming refers to the process of breaking a large, unwieldy programming task into separate, smaller, more manageable subtasks or

Install Python on Mac

1. 从官网下载最新版Python 3.X 后安装:由于Mac OS X EI Capitan中默认已经集成了 Python 2.7,因此需要在Terminal中输入 Python3 来检测是否安装成功,使用Python命令默认调用的是Python 2.7. 2. 安装pip:从官网页面下载get-pip.py文件(不要在意该网页中依据python版本判断你是否已经安装,直接在Terminal中输入命令pip,如果无效,则证明没有安装),然后输入进入到get-pip.py所在目录,使用pytho

【python】install python 2.7.9

CentOS 7.1  自带 python 2.7.5, 存在sslv3验证的问题,需要通过升级来解决 /// /// 新系统自带的 Python /// [[email protected] tools]# python -V Python 2.7.5 [[email protected] tools]# which python /usr/bin/python [[email protected] tools]# /// /// 利用 yum 升级 python /// [[email pr

Install Python and It’s Plugins With NO Privileges

http://lujialong.com/?p=150 在没有root权限的情况下,需要安装python的插件,或者升级python. 做法就是废弃系统中默认装好的Python,为自己这个普通用户编译一个新的python,然后再为这个新的python装模块. 以为python在安装模块时,会根据python对应的路径去找对应的site-packages,将第三方模块安装到这个目录下. 具体python对应的site-packages在那里,可以调用: 对应的python -c “from dis