Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
771
25
發布擴充功能與程式
Python
distutils
是標準程式庫的一部分,也是用來封裝(packaging
和發布(distributingPython 程式和擴充功能的工具之基礎。然而,我們
不建議直接使用
distutils
:請改為使用較新的第三方工具。在多數情況
中,你會想要使用
setuptools
wheels
來建立
wheels
,然後使用
twine
它們上傳到你最愛的存放庫(repository,通常是 PyPIPython Package
Index,即The Cheeseshop
https://wiki.python.org/moin/CheeseShop
)),
使用
pip
來下載並安裝它們。如果你沒有安裝
pip
(它隨附於 v2 v3),
請參閱 pip 的安裝頁面(
http://bit.ly/2o9pAH4
)。請確定你用的是最新版
pip
,執行
pip install --upgrade pip
來升級到最新版。在 Windows
上,執行
py -m pip install -U pip setuptools
,然後確定
pip
有在你系統
PAT H 上,方法就跟確定 Python 有在你的 PAT H 上(
http://bit.ly/2mQEItb
時一樣。
在本章中,我們涵蓋了
setuptools
twine
最簡單的用法,可滿足最常見
的封裝需求。要找更深入或進階的說明,請參閱 Python Packaging User
Guide
https://packaging.python.or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

利用 Python 进行数据分析(原书第2版)

利用 Python 进行数据分析(原书第2版)

Wes McKinney

Publisher Resources

ISBN: 9789864766819