1. 准备

安装模块

# yum groupinstall "Development tools"
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel


# Python 2.7.6:
2.7.6.tar.xz
2.7.6.tar.xz
2.7.6
altinstall(此处切记,要么以root运行,要么分开执行!)
 
 
 
# Python 3.3.5:
3.3.5.tar.xz
3.3.5.tar.xz
3.3.5
altinstall(此处切记,要么以root运行,要么分开执行!)
 
 
 

下载和安装Setuptools + pip

Setuptools 早已取代 Distribute 成为Python官方的拓展包管理器,以用于从Python Package Index安装拓展功能包。 不同版本的Python需要的Setuptools版本不同。建议您也通过Setuptools安装 pip,它提供了一些额外在安装拓展功能包时很有用的功能。

以下的命令可用于安装最新版Setuptools 和 pip

 

# First get the setup script for Setuptools:

.py
 
# Then install it for Python 2.7 and/or Python 3.3:
 
.py
.py
 
# Now install pip using the newly installed setuptools:
 
pip
pip
 
# With pip installed you can now do things like this:
 
]
]
]
 
安装的拓展功能包在 /usr/local/lib/pythonX.Y/site-packages/ 中可以找到(X.Y 是Python的版本号)。
 
 



 
 
 
 
 
 
 

相关文章:

  • 2021-06-04
  • 2022-12-23
  • 2021-12-09
  • 2021-11-06
  • 2021-12-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案