Python安裝模組有哪些方法?
python中的模組非常多,使用也很頻繁。為了節約時間,我們也不可能等待全部慢慢下載。那麼,有沒有快捷的方法呢?
現在pip是python官網上推薦的安裝python模組的方式,從Python2.7.9就自帶了pip,安裝路徑在C:Python27Scripts。
方法1:easy_install方式
先下載ez_setup.py,執行pythonez_setup進行easy_install工具的安裝,之後就可以使用easy_install進行安裝package了。本文安裝的是Python2.7.13版本,已經自帶了easy_install。
easy_installpackageName
easy_installpackage.egg
方法2:pip方式
先進行pip工具的安裝:easy_installpip(pip可以透過easy_install安裝,而且也會裝到Scripts資料夾下。)本文安裝的是Python2.7.13版本,已經自帶了pip。
安裝:pipinstallPackageName
更新:pipinstall-UPackageName
移除:pipuninstallPackageName
搜尋:pipsearchPackageName
幫助:piphelp
方法3:下載原始碼,用setup.py安裝
下載模組包,進行解壓,進入模組資料夾,執行:
pythonsetup.pyinstall
方法4:單檔案模組
直接把檔案複製到$python_dir/Lib
以上就是Python安裝模組的四種方法。更多Python學習推薦:。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/2459/viewspace-2832356/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- python 安裝模組的方法Python
- Python如何檢視安裝了哪些模組?Python
- Python中常用模組有哪些?Python
- Python中模組是什麼?Python有哪些模組?Python
- Python模組安裝Python
- 【Python】Python安裝模組Python
- pycharm安裝python模組PyCharmPython
- Python中常用模組有哪些?Python基礎教程Python
- python中list有哪些方法Python
- Python安裝selenium模組Python
- python openssl模組如何安裝?Python
- python-模組,包,安裝Python
- python threading模組有哪些函式Pythonthread函式
- Python語言模組分為哪幾類?有哪些主要模組?Python
- Python 安裝第三方模組的三種方法Python
- python安裝模組cx_OraclePythonOracle
- 手撕Vuex-安裝模組方法Vue
- python裝飾器有哪些作用Python
- 安裝python pip,再安裝request模組,執行python程式碼Python
- Python中常用的資料分析工具(模組)有哪些?Python
- python有哪些is開頭的字串方法Python字串
- python模組安裝目錄在哪裡Python
- 怎樣安裝python的GPIO模組Python
- Python模組、第三方模組安裝、模組匯入教程Python
- Python3 安裝第三方模組的二種方法Python
- Python中常用的模組有哪些?看看你知道幾個!Python
- Python中爬蟲模組有哪些?優缺點介紹!Python爬蟲
- python建立新執行緒有哪些方法Python執行緒
- Python入門學習方法有哪些呢?Python
- Python列表刪除元素的方法有哪些?Python
- Python字串是什麼?常用方法有哪些?Python字串
- Python求最大值的方法有哪些?Python
- Python paramiko模組的安裝與使用Python
- 為Python 3.5及以上安裝Pygame模組PythonGAM
- windows下python安裝Numpy和Scipy模組WindowsPython
- python(pip)包/模組:如何離線安裝?Python
- 盲盒APP功能模組有哪些?APP
- Python常用時間模組有哪些?這幾個很關鍵!Python