Python3 windows如何安裝模塊 setuptools

下載的module解壓后里面有setup.py文件,若是打開setup.py文件裏面有這段代碼:python

from setuptools import setup
...
setup(
...

 這種的都須要調用setuptools模塊。測試

 

python3裏面沒有setuptools模塊,可是有distribute模塊。做用基本相同,想easy_install,就用distribute in python3.3d

 

步驟

1. 下載distribute模塊,解壓。cmd切換到目錄。運行setup.py install安裝distribute模塊。blog

 

2. 解壓要安裝的模塊,cmd切換到目錄,運行setup.py install進行安裝。(這裏用progressbar模塊作演示)cmd

3. 經過setup.py install的模塊的通常結構。class

4. 使用import 模塊進行測試。若是import 模塊沒有問題,基本就安裝成功。import

5. 打開模塊裏面的examples.py文件, F5運行下吧。看看各類examples。module

相關文章
相關標籤/搜索