導航:首頁 > 編程語言 > python庫安裝

python庫安裝

發布時間:2022-01-16 09:48:27

A. python如何安裝請求庫

pip install requests
如果你是py3,就用pip3 install requests

B. python 第三方庫怎麼安裝

【方法一】: 通過setuptools來安裝python模塊
首先下載
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 indivial packages.
unzip DEPRECATED. Unzip indivial 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:passwd@]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非官方包下載,二進制文件,下載安裝方便.

C. Python第三方庫安裝

你的圖片太花了,看不到幾個字母。

不過,你這個問題描述,也能大致理解是什麼情況。建議做如下處理試一下:

(1)找到你的 Python 安裝目錄,找到下面的 site-packages 文件夾,這個文件夾用於存放第三方庫,而且也是環境變數路徑(如果你在安裝Python時勾選了寫入環境變數的話,如果沒有就自己加入進去即可);

(2)將你自己的庫文件放到這個文件夾里;

(3)之後就可以像使用其他庫一樣使用了,如import sys這種的;

(4)注意記住你自己的庫文件名,且不要與已有第三方庫和標准庫重名。

D. 如何用pip安裝python庫

這些方法都是很難操作,直接在系統盤下面輸入:pip install requests

E. python中怎麼安裝jieba庫

首先點擊桌面左下角的開始圖標,然後選擇運行。
(推薦教程:Python入門教程)
在彈出的窗口中輸入cmd,然後點擊確定。
輸入:pip install jieba,然後按下回車鍵會自動開始安裝。
安裝成功後輸入:python -m pip list,然後按下回車鍵來看下jieba庫是否安裝成功。
輸入:python,按下回車鍵,進入python解釋器。
輸入代碼:import jieba,導入這個庫,如果不報錯就時安裝成功啦。

F. python庫安裝

你這個是在安裝什麼庫呢

一般安裝就是pip install xxx
或者去下載這個庫的文件 pip install 文件路徑

G. python的exe庫怎麼安裝

python 打包成exe 主要有兩種,一種是py2exe,另一種便是pyInstaller,之前我是用py2exe的,但是我後來發現py2exe存在問題:1,打包好的 exe只能在相同的系統下運行,比如你在XP系統用py2exe打包好的exe只能在XP上運行,在win7上肯定有問題,而且也是存在在別的XP機子上也可能不能運行,因為一些別的機子可能會缺少dll文件什麼的,作者我當時之所以拋棄py2exe 也是因為這個原因;2,打包的文件也需要打包同exe下的dll,和一些庫的壓縮包,不然exe根本跑不起來。

H. python怎樣安裝第三方庫

方法1:下載源碼,手動運行setup.py install去安裝
下載對應的源碼,往往都是.tar.gz,.zip的壓縮包,解壓後,打開windows的cmd,切換到對應目錄,運行:
setup.py install
即可去安裝。
方法2:利用第三方安裝工具(如pip,easy_install,distribute等)去自動化安裝
利用的目前常見的一些自動化安裝工具,比如pip,easy_install,distribute等,自動幫你下載源碼,並安裝。
而且很多時候,由於要安裝的包,還要依賴一些其他的別的包,而這類自動化安裝工具,會自動幫你解決依賴關系,自動幫你下載並安裝所缺少的那些包,所以相對來說,就省去了你的麻煩了。

I. python庫怎麼安裝

python庫的安裝方法:
1.下載distribute,http://pypi.python.org/pypi/distribute/0.6.30;

2.如果沒有配置python的環境變數,那麼先要在環境變數PATH這一項里加入python安裝目錄,如C:\python32。加入了就直接到下一步;
3.解壓後在命令行中cd 到distribute-0.6.30文件夾目錄,輸入python setup.py install執行。等待安裝完成;
4.在環境變數PATH中加入python安裝目錄的Scripts文件夾,如C:\python32\Scripts。這裡面有easy_install;
5.解壓下載好的第三方庫如openpyxl-1.6.1.tar.gz,在命令行中cd 到解壓後目錄openpyxl-1.6.1的上一層,輸入easy_install openpyxl-1.6.1執行。

J. python怎麼安裝第三方類庫

使用pip
大多數庫都可以通過pip安裝,安裝方法為,在命令行窗口輸入
pip install libname
libname為庫名
某些庫通過pip安裝不了,可能是因為沒有打包上傳到pypi中,可以下載安裝包之後離線安裝,方法是
pip install libpath
libpath為本地安裝包地址,這些安裝包一般以whl為後綴名。表示python擴展包的windows環境下的二進制文件。
有一個專門下載這種文件的地方http://www.lfd.uci.e/~gohlke/pythonlibs/,是由加利福尼亞大學的師生為方便python用戶使用而建立的,並非官方出品,使用時需自行承擔風險。
源文件安裝
如果下載下來的安裝包為帶有源文件的壓縮包,解壓之後,運行setup.py進行安裝,方法是
命令行切換到安裝包中setup.py文件所在的目錄,執行 python setup.py install
運行安裝包
有些類庫提供了雙擊運行直接安裝的安裝包,比如python連接mysql資料庫的驅動 mysql-connector-python
這些安裝包的後綴名為msi或者exe。下載下來之後,雙擊運行之後就安裝好了,前提是要根據python的版本及windows的位數下載對應的安裝包,否則安裝過程會報錯或者直接提示無法安裝。

閱讀全文

與python庫安裝相關的資料

熱點內容
安卓路由表怎麼看 瀏覽:74
10個小孩分糖果python 瀏覽:823
安卓app小紅點怎麼取消 瀏覽:286
馬哥linux面授 瀏覽:768
2345程序員 瀏覽:371
怎麼開啟網速顯示安卓 瀏覽:204
索尼950app怎麼樣 瀏覽:391
計算機畢設論文源碼 瀏覽:148
小米手機怎麼下載易媒體App 瀏覽:191
還原系統設計可以怎樣清理文件夾 瀏覽:670
北京時間校準伺服器雲伺服器 瀏覽:844
pythonexcel數據計算 瀏覽:49
內醫附院黨建APP怎麼下載 瀏覽:356
榮耀v20刷加密門禁卡 瀏覽:329
app緩沖視頻怎麼保存在手機 瀏覽:433
廣度優先演算法c語言 瀏覽:680
提高程序員競爭力 瀏覽:108
nfc可以開加密門卡嗎 瀏覽:675
如何知道網頁使用的伺服器是什麼 瀏覽:224
單片機接反電源會燒嗎 瀏覽:287