當前位置:首頁 » 編程語言 » pythonsetuptool安裝

pythonsetuptool安裝

發布時間: 2022-07-03 19:23:16

python 怎樣安裝setuptools

windows下安裝了easy_install之後,把python目錄中的Scripts目錄加到環境變數中, 然後直接在命令行中輸:easy_install 【要安裝的模塊】 linux下比較簡單,Centos裡面是yum install python-setuptools yum install python-setuptools-devel

② python怎麼進行安裝setuptools

需求來源:

研究微博最新登陸密碼加密方式為rsa2,python裡面需要裝rsa模塊才能用。

安裝rsa模塊,需要用easy_install安裝。

要用easy_install,就要裝setuptools。

概念簡介:

setuptools

是 Python Enterprise Application Kit(PEAK)的一個副項目,可以讓程序員更方便的創建和發布 Python 包。

easy_install

當需要安裝第三方python包時,可能會用到easy_install命令。easy_install是由PEAK(Python Enterprise
Application
Kit)開發的setuptools包里帶的一個命令,所以使用easy_install實際上是在調用setuptools來完成安裝模塊的工作。

安裝:

windows下:

下載ez_setup.py

調用相應版本的python ez_setup.py執行。

我裝了兩個版本python,2.7和3.2,都set了環境變數中的path。

當我用python27 ez_setup.py,則自動在該版本安裝目錄下產生Scripts 目錄,並將安裝的東西放在那。

用python32 ez_setup.py,則在32版本的目錄下產生安裝文件。

linux下:

比如ubuntu系列的

復制代碼
代碼如下:

# apt-get install
python-setuptools

使用:

安裝模塊:

復制代碼
代碼如下:

easy_install package-name

卸載模塊:

復制代碼
代碼如下:

easy_install -m package-name

但卸載後還要手動刪除遺留文件

安裝rsa-3.1.1-py2.7.egg:

下載rsa-3.1.1-py2.7.egg

切換目錄

執行命令:

復制代碼
代碼如下:

easy_install.exe rsa-3.1.1-py2.7.egg

③ 怎麼安裝python的setuptools

windows下:
下載ez_setup.py
調用相應版本的python ez_setup.py執行。
我裝了兩個版本python,2.7和3.2,都set了環境變數中的path。
當我用python27 ez_setup.py,則自動在該版本安裝目錄下產生Scripts 目錄,並將安裝的東西放在那。
用python32 ez_setup.py,則在32版本的目錄下產生安裝文件。
linux下:
比如ubuntu系列的
代碼如下:
# apt-get install python-setuptools
使用:
安裝模塊:
代碼如下:
easy_install package-name
卸載模塊:
代碼如下:
easy_install -m package-name

④ python怎麼安裝setuptools

http://blog.csdn.net/robertkun/article/details/9751123

⑤ 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非官方包下載,二進制文件,下載安裝方便.

⑥ 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執行。

⑦ python安裝setuptools失敗

看最後一句話:Unable to find vcvarsall.bat,所以出錯是因為沒找到VC編譯環境。
你安裝Visual Studio了嗎?
如果已經安裝,最好是從Visual Studio內啟動命令行,這樣python的編譯環境就全了。

另外,安裝的時候缺少一些庫所以會有警告,但是不是致命錯誤。

⑧ python怎麼安裝 setuptools

  • 下載ez_setup.py 到某一個目錄(如: e: oolsez_setup.py),

下載地址: https://bootstrap.pypa.io/ez_setup.py

  • 安裝: 進入e: ools, 運行: c:Python33python.exe ez_setup.py

  • 在這個過程中, 系統會連接網路下載所需要的安裝包並完成安裝. 這樣setuptools安裝成功後,就可以使用easy_install了。


如果解決了您的問題請採納!
如果未解決請繼續追問

⑨ Python3.5 這么安裝setuptools和pip

你要切換到F盤,然後再執行
因為你在C執行的CD 所以並沒有切換好目錄,所以不行
F:
這個命令就切到F盤

熱點內容
shell腳本平方計算公式 發布:2024-04-26 23:29:26 瀏覽:187
比較實惠的雲伺服器 發布:2024-04-26 23:24:57 瀏覽:974
怎麼增加電腦緩存 發布:2024-04-26 23:23:46 瀏覽:451
android調試gdb 發布:2024-04-26 23:22:27 瀏覽:99
androidsocket服務 發布:2024-04-26 22:49:53 瀏覽:980
python編譯時加密 發布:2024-04-26 22:49:20 瀏覽:246
買車看哪些配置參數 發布:2024-04-26 22:45:50 瀏覽:835
linux顯示圖像 發布:2024-04-26 22:45:41 瀏覽:493
flash腳本格式 發布:2024-04-26 22:43:41 瀏覽:452
c語言求三位數 發布:2024-04-26 22:43:39 瀏覽:690