自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

在python包管理中使用easy_install軟件的步驟

開發(fā) 后端
本文主要介紹的是讓python包管理變得更加容易的實際應用方法,就是運用easy_install這一軟件,下面是文章的具體介紹。

easy_install讓python包管理變得

如果你想對Python包管理在實際操作過程中的實際應用方案更加的簡便,你就可以試用easy_install這一工具,你如果在python包管理中想用這一軟件,你就可以瀏覽以下的文章。希望你能夠從中獲得更多的知識。

Python中的easy_install工具很好用,它的作用類似于Php中的pear,或者Ruby中的gem,或者Perl中的cpan。如果想使用easy_install工具,可以直接安裝ez_setup.py腳本,再python ez_setup.py(之前先要安裝python):

安裝完后,最好確保easy_install所在目錄已經被加到PATH環(huán)境變量里:

 

  1. Windows: C:\Python25\Scripts  
  2. Linux: /usr/local/bin 

比如說要安裝Python的MySQL支持,可以執(zhí)行如下命令,系統(tǒng)會自動在pypi網站列表里查找相關軟件包,并選擇合適的版本:

 

  1. easy_install MySQL-python 

通過easy_install安裝軟件,相關安裝信息會保存到easy-install.pth文件里,路徑類似如下形式:

 

  1. Windows:C:\Python25\Lib\site-packages\
    easy-install.pth  
  2. Linux:/usr/local/lib/python25/
    site-packages/easy-install.pth 

如果想刪除通過easy_install安裝的軟件包,比如說:MySQL-python,可以執(zhí)行命令:

 

  1. easy_install -m MySQL-python 

此操作會從easy-install.pth文件里把MySQL-python的相關信息抹去,剩下的egg文件,你可以手動刪除。對于已經下載了的python包,easy_install也可以安裝,只要進入軟件包目錄,然后“easy_install .”即可更多使用方法參見peak上的介紹,

使用easy_install安裝python環(huán)境:#t#

1、下載python2.5安裝文件安裝(最新的穩(wěn)定版,不要嘗試 python2.6或3.0,因為許多py包還不支持)

2、下載pyreadline可執(zhí)行文件安裝

3、下載ez_install.py運行

4、easy_install ipython ipy pylint django robotframework mechanize

5、不能使用easy_install的特殊情況:

a、安裝默認版本的MySQL-python會報錯,需要指定版本如下:

  1. easy_install "MySQL-python==1.2.2" 

 

b、有些包直接easy_install會失敗,需要自行下載安裝:wxpython,pil要下載exe安裝程序robotide因為在pypi上找不到,要下載后再easy_install
 

 

責任編輯:佚名 來源: 互聯(lián)網
相關推薦

2020-06-28 13:56:01

UbuntuAptSynaptic

2013-11-20 15:32:13

紅帽RedHatYUM包

2020-06-15 19:20:00

AppImageLinux軟件包管理

2010-01-11 17:49:08

Fedora軟件包

2010-01-13 13:04:25

minicom軟件

2010-01-05 10:14:09

Ubuntu軟件包

2021-02-28 13:26:15

Linux軟件包管理器軟件倉庫

2022-03-21 21:28:00

Homebrew包管理器Linux

2010-03-17 10:42:32

Python學習筆記

2016-01-29 14:32:19

Linux軟件包管理

2020-06-01 07:00:00

WingetWindows 10軟件包管理器

2022-05-07 11:08:50

Linuxapt 命令

2022-05-04 11:10:58

Linuxdnf 命令

2021-12-09 09:27:22

MacOSHomebrew包管理器

2019-12-12 13:50:27

strace追蹤系統(tǒng)調用Linux

2011-06-23 10:39:43

ibmdw虛擬化敏捷開發(fā)

2021-10-14 18:00:51

systemd系統(tǒng)管理員系統(tǒng)運維

2021-05-06 08:04:37

存儲StratisCentos 8

2010-02-05 14:46:20

Ubuntu軟件包

2011-11-09 09:29:03

軟件項目
點贊
收藏

51CTO技術棧公眾號