Python安裝第三方庫的三種方法
- 首先下載 http://peak.telecommunity.com/dist/ez_setup.py
NOTE: 最好下載個setuptools,本人是15.2版本,裡面包含了ez_setup
- 執行 python ez_setup.py
D:\work\installation\setuptools-15.2\setuptools-15.2>python ez_setup.py > 1.txt Extracting in c:\users\admini~1\appdata\local\temp\tmpbxikxf Now working in c:\users\admini~1\appdata\local\temp\tmpbxikxf\setuptools-15.2 Installing Setuptools ...... Copying setuptools-15.2-py2.7.egg to c:\python27\lib\site-packages setuptools 15.2 is already the active version in easy-install.pth Installing easy_install-script.py script to C:\Python27\Scripts Installing easy_install.exe script to C:\Python27\Scripts Installing easy_install-2.7-script.py script to C:\Python27\Scripts Installing easy_install-2.7.exe script to C:\Python27\Scripts Installed c:\python27\lib\site-packages\setuptools-15.2-py2.7.egg Processing dependencies for setuptools==15.2 Finished processing dependencies for setuptools==15.2
- 執行 easy_install py
D:\work>easy_install py #py 為第三方庫檔案
Searching for py
Best match: py 1.4.26
Adding py 1.4.26 to easy-install.pth file
Using c:\python27\lib\site-packages
Processing dependencies for py
Finished processing dependencies for py
【方法二】:通過pip來安裝python模組- 安裝 easy_install pip
D:\work>easy_install pip Searching for pip Best match: pip 6.1.1 Processing pip-6.1.1-py2.7.egg pip 6.1.1 is already the active version in easy-install.pth Installing pip-script.py script to C:\Python27\Scripts Installing pip.exe script to C:\Python27\Scripts Installing pip2.7-script.py script to C:\Python27\Scripts Installing pip2.7.exe script to C:\Python27\Scripts Installing pip2-script.py script to C:\Python27\Scripts Installing pip2.exe script to C:\Python27\Scripts Using c:\python27\lib\site-packages\pip-6.1.1-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip
- 執行 pip install xlrd
Usage:
pip <command> [options]
Commands:
install Install packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
search Search PyPI for packages.
wheel Build wheels from your requirements.
zip DEPRECATED. Zip individual packages.
unzip DEPRECATED. Unzip individual packages.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring
environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be
used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output.
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form
[user:[email protected]]proxy.server:port.
--retries <retries> Maximum number of retries each connection should
attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists:
(s)witch, (i)gnore, (w)ipe, (b)ackup.
--trusted-host <hostname> Mark this host as trusted, even though it does
not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file
containing the private key and the certificate
in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
【方法三】:直接從網上下載下可執行檔案來安裝.
比如說,去 >>> pythonlibs <<< 網站,提供了很多Python非官方包下載,二進位制檔案,下載安裝方便.
相關推薦
Python安裝第三方庫的三種方法
【方法一】:通過setuptools來安裝python模組 首先下載 http://peak.telecommunity.com/dist/ez_setup.py NOTE: 最好下載個setuptools,本人是15.2版本,裡面包含了ez_setup 執行 pyt
Python安裝第三方庫,出現‘PyThreadState’ has no member named ‘exc_type’解決方法
最近由於工作需要,要從hbase中讀取資料,然後處理過後,展示給使用者,在網上搜通過Python的happybase模組可以進行簡單快捷的讀取,但是在安裝happybase,讓我非常不開心,具體錯誤如下: Collecting happybase Using
CentOS下安裝JDK的三種方法
symbols 打開 version aws sin javadoc 環境 amd64 home 由於各Linux開發廠商的不同,因此不同開發廠商的Linux版本操作細節也不一樣,今天就來說一下CentOS下JDK的安裝: 方法一:手動解壓JDK的壓縮包,然後設置環境變
Python列表刪除的三種方法
存儲 需要 刪除元素 /usr 一個 last 可能 light pytho 1、使用del語句刪除元素 >>> i1 = ["a",‘b‘,‘c‘,‘d‘] >>> del i1[0] >>> print(i1)
Python 安裝第三方庫中常見問題總結
python 安裝 denied all out perm bsp step 疑問 三方庫 1.安裝某個庫時,例如 pip install tinify 出現Permission denied時,在安裝命令的最前面添加sudo 例如: sudo pip install ti
Python中替換的三種方法
nbsp 分享 分別是 images 空白 圖片 png 除開 str strip() replace() re.sub() 1.replace()是python的內置函數,字符類型.replace(old,new) s1="你好2017" s1.rep
ubuntu下安裝程序的三種方法(轉)
安裝nagios -s 需要 ibm 查詢 gin make this www. 引言 在Ubuntu當中,安裝應用程序我所知道的有三種方法,分別是apt-get,dpkg安裝deb和make install安裝源碼包三種。下面針對每一種方法各舉例來說明。 一、apt-
Python 安裝第三方庫
解決 ffffff ssl ppi all cau was nbsp bsp cmd進入Python安裝路徑scripts文件夾 >pip install requests 報錯: Collecting requests Retrying (Retry(total=
Python讀取txt的三種方法
方法一: #read txt method one f = open( "./ima
Ubuntu下安裝程式的三種方法 ubuntu製作本地源
在ubuntu當中,安裝應用程式我所知道的有三種方法,分別是apt-get,dpkg安裝deb和make install安裝原始碼包三種。下面針對每一種方法各舉例來說明。 apt-get方法 使用apt-get install來安裝應用程式算是最常見的一種安裝方法了,比如我要安裝build-essenti
python反轉list的三種方法
現有a = [1,2,3,4,5],現需要進行對a進行反轉 方法1:list(reversed(a)) reversed(a)返回的是迭代器,所以前面加個list轉換
在CentOS上安裝Python3的三種方法
Centos7預設自帶了Python2.7版本,但是因為專案需要使用Python3.x你可以按照此文的三個方法進行安裝. 注:本文示例安裝版本為Python3.5, 一、Python原始碼編譯安裝 安裝必要工具 yum-utils ,它的功能是管理repository及擴充套件包的工具 (主要是針對re
python安裝第三方庫提示cc1plus: warning: command line option “-Wstrict-prototypes” is valid for C/ObjC ....
py2安裝pyltp的時候一直卡著不動,使用-v引數檢視安裝過程,發現一直提示:cc1plus: warning: command line option “-Wstrict-prototypes” is valid for Ada/C/ObjC but not for C++。py3安裝pyl
LInux安裝jdk的三種方法
環境 Linux版本:CentOS 6.5、Ubuntu 12.04.5 JDK版本:JDK 1.7 目錄 方法一:手動解壓JDK的壓縮包,然後設定環境變數 方法二:用yum安裝JDK 方法三:用rpm安裝JDK 方法四:Ubuntu 上使用apt-get安裝J
ubuntu下安裝程式的三種方法
引言 在ubuntu當中,安裝應用程式我所知道的有三種方法,分別是apt-get,dpkg安裝deb和make install安裝原始碼包三種。下面針對每一種方法各舉例來說明。 apt-get方法 使用apt-get install來安裝應用程式算是最常見的一種安裝方法
Linux下安裝與解除安裝工具(三種方法)
三種方法為:rpm工具、yum工具、原始碼包 rpm工具(操作繁瑣) 光碟機掛載到mnt:mount /dev/cdrom /mnt/centos安裝包中就有rpm包 Packages rpm -ivh rpm包檔案 //安裝rpm -Uvh rpm包檔案 //升級rpm -e 包名 //解除安裝(包名
python 安裝第三方庫,超時報錯--Read timed out.
Traceback (most recent call last):File "/home/xiaoduc/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pip/_vendor/requests/packages/ur
MyEclipse安裝外掛的三種方法和使用心得
本文講解MyEclipse(MyEclipse10)的三種方法,以TestNG為例 一、通過MyEclipse Configuration Center線上安裝 1. 開啟MyEclipse10,在選單欄選擇MyEclipse→MyEclipse
安裝Ubuntu系統三種方法
在學習linux的過程中,ubuntu無疑是初學者的最佳選擇。 下面來列舉給Windows系統安裝ubuntu雙系統的三種方法。 一、虛擬機器安裝(不推薦) 使用工具:Vmware 如果不是因為迫不得已,比如Mac OS對硬體不相容,Federa安裝頻繁出錯,各
window下安裝docker的三種方法
方法3. Docker for Windows 系統要求:64bit Windows 10 Pro, with Enterprise and Education (1511 November update, Build 10586 or later),。 參考地