-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathmac.po
More file actions
848 lines (754 loc) · 42.4 KB
/
mac.po
File metadata and controls
848 lines (754 loc) · 42.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
# Freesand Leo <yuqinju@163.com>, 2025
# 99 <wh2099@pm.me>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-07 14:20+0000\n"
"PO-Revision-Date: 2025-09-16 00:02+0000\n"
"Last-Translator: 99 <wh2099@pm.me>, 2026\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../using/mac.rst:6
msgid "Using Python on macOS"
msgstr "在 macOS 上使用 Python"
#: ../../using/mac.rst:11
msgid ""
"This document aims to give an overview of macOS-specific behavior you should"
" know about to get started with Python on Mac computers. Python on a Mac "
"running macOS is very similar to Python on other Unix-derived platforms, but"
" there are some differences in installation and some features."
msgstr ""
"本文档旨在为您于 Mac 电脑上开始使用 Python 前提供您必须了解的 macOS 平台之特有行为。在运行了 macOS 的 Mac 电脑上使用 "
"Python 与在其他 Unix 家族平台电脑上面使用 Python 的体验非常相近,但在 Python 安装及部分特性上仍存有些许差异。"
#: ../../using/mac.rst:16
msgid ""
"There are various ways to obtain and install Python for macOS. Pre-built "
"versions of the most recent versions of Python are available from a number "
"of distributors. Much of this document describes use of the Pythons provided"
" by the CPython release team for download from the `python.org website "
"<https://www.python.org/downloads/>`_. See :ref:`alternative_bundles` for "
"some other options."
msgstr ""
"有多种途径可为 macOS 获取 Python 。多家软件分发源均提供最新版 Python 的预编译版本。本文档的多数内容描述的是由 CPython "
"发布团队于 `python.org 网站 <https://www.python.org/downloads/>`_ 中提供下载的 Python "
"版本。参见 :ref:`alternative_bundles` 获取其他选择。"
#: ../../using/mac.rst:27
msgid "Using Python for macOS from ``python.org``"
msgstr "使用来自 ``python.org`` 的 macOS 版 Python"
#: ../../using/mac.rst:30
msgid "Installation steps"
msgstr "安装步骤"
#: ../../using/mac.rst:32
msgid ""
"For `current Python versions <https://www.python.org/downloads/>`_ (other "
"than those in ``security`` status), the release team produces a **Python for"
" macOS** installer package for each new release. A list of available "
"installers is available `here <https://www.python.org/downloads/macos/>`_. "
"We recommend using the most recent supported Python version where possible. "
"Current installers provide a `universal2 binary "
"<https://en.wikipedia.org/wiki/Universal_binary>`_ build of Python which "
"runs natively on all Macs (Apple Silicon and Intel) that are supported by a "
"wide range of macOS versions, currently typically from at least **macOS "
"10.15 Catalina** on."
msgstr ""
"对于 `当前 Python 版本 <https://www.python.org/downloads/>`_ (处于 ``security`` "
"状态的除外),发布团队为每个新发布版制作了 **macOS 版 Python** 安装程序包。 可以在 `这里 "
"<https://www.python.org/downloads/macos/>`_ 查看安装程序列表。 我们推荐尽可能使用最新的受支持的 "
"Python 版本。 当前安装程序提供了可原生运行于所有 Mac (Apple Silicon 和 Intel) 并支持主流 macOS 版本的 "
"`universal2 二进制 <https://en.wikipedia.org/wiki/Universal_binary>`_ Python "
"构建版,目前通常至少支持到 **macOS 10.15 Catalina**。"
#: ../../using/mac.rst:44
msgid ""
"The downloaded file is a standard macOS installer package file (``.pkg``). "
"File integrity information (checksum, size, sigstore signature, etc) for "
"each file is included on the release download page. Installer packages and "
"their contents are signed and notarized with ``Python Software Foundation`` "
"Apple Developer ID certificates to meet `macOS Gatekeeper requirements "
"<https://support.apple.com/en-us/102445>`_."
msgstr ""
"您下载的文件是一个标准的 macOS "
"安装器包文件(``.pkg``)。我们为每个文件都提供用于校验文件完整性的资料(校验码、文档大小、签名等),随附于下载页面中。安装器包及其内容均使用 "
"``Python Software Foundation`` 的 Apple 开发者 ID 证书签名及公证,符合 `macOS "
"门禁(Gatekeeper)要求 <https://support.apple.com/en-us/102445>`_。"
#: ../../using/mac.rst:50
msgid ""
"For a default installation, double-click on the downloaded installer package"
" file. This should launch the standard macOS Installer app and display the "
"first of several installer windows steps."
msgstr "如欲使用默认预设安装配置,请直接双击您所下载的安装包文件。这将开启 macOS 内置的标准安装器软件,窗口中会显示安装步骤的第一步。"
#: ../../using/mac.rst:56
msgid ""
"Clicking on the **Continue** button brings up the **Read Me** for this "
"installer. Besides other important information, the **Read Me** documents "
"which Python version is going to be installed and on what versions of macOS "
"it is supported. You may need to scroll through to read the whole file. By "
"default, this **Read Me** will also be installed in "
"|applications_python_version_literal| and available to read anytime."
msgstr ""
"点击 **Continue** 按钮将显示安装程序的 **Read Me**。 在其他重要信息之外,**Read Me** 文档会写明将要安装的 "
"Python 版本以及它所支持的 macOS 版本。 你可能需要滚动窗口来阅读整个文件。 在默认情况下,该 **Read Me** 也会被安装在 "
"|applications_python_version_literal| 中并可供随时阅读。"
#: ../../using/mac.rst:64
msgid ""
"Clicking on **Continue** proceeds to display the license for Python and for "
"other included software. You will then need to **Agree** to the license "
"terms before proceeding to the next step. This license file will also be "
"installed and available to be read later."
msgstr ""
"点击 **继续** 按钮将会显示 Python 软件及其他随附软件的授权许可。你需要选择 **同意** "
"该许可证才能继续下一步安装。同样,许可证日后也会安装在磁盘中以供随时阅读。"
#: ../../using/mac.rst:71
msgid ""
"After the license terms are accepted, the next step is the **Installation "
"Type** display. For most uses, the standard set of installation operations "
"is appropriate."
msgstr "接受许可证条款后,下一步是选择您的安装类型。在大多数情况下,默认的标准安装操作就是最适合您的安装类型。"
#: ../../using/mac.rst:76
msgid ""
"By pressing the **Customize** button, you can choose to omit or select "
"certain package components of the installer. Click on each package name to "
"see a description of what it installs. To also install support for the "
"optional free-threaded feature, see :ref:`install-freethreaded-macos`."
msgstr ""
"按下 **Customize** 按钮,你可以选择忽略或选定安装程序中的特定软件包组件。 点击各软件包名称查看其安装说明。 "
"如果还要安装对可选的自由线程特性的支持,请参阅 :ref:`install-freethreaded-macos`。"
#: ../../using/mac.rst:84
msgid ""
"In either case, clicking **Install** will begin the install process by "
"asking permission to install new software. A macOS user name with "
"``Administrator`` privilege is needed as the installed Python will be "
"available to all users of the Mac."
msgstr ""
"不论您选择接受默认安装配置还是自定义安装配置,点击 **安装** 按钮即可开始安装过程。您可能会被要求提供安装软件所需的必要权限。您需要提供拥有 "
"``Administrator`` (管理员)权限的 macOS 用户名和密码,因为 Python 会面向电脑中的所有用户安装。"
#: ../../using/mac.rst:88
msgid "When the installation is complete, the **Summary** window will appear."
msgstr "安装完成后会显示 **概览** 窗口。"
#: ../../using/mac.rst:92
msgid ""
"Double-click on the :command:`Install Certificates.command` icon or file in "
"the |applications_python_version_literal| window to complete the "
"installation."
msgstr ""
"双击 :command:`Install Certificates.command` 图标或 "
"|applications_python_version_literal| 窗口中的文件来完成安装。"
#: ../../using/mac.rst:98
msgid ""
"This will open a temporary :program:`Terminal` shell window that will use "
"the new Python to download and install SSL root certificates for its use."
msgstr "这会开启一个临时的 :program:`Terminal` 命令行窗口,使用新安装的 Python 下载并安装SSL根证书供其使用。"
#: ../../using/mac.rst:104
msgid ""
"If ``Successfully installed certifi`` and ``update complete`` appears in the"
" terminal window, the installation is complete. Close this terminal window "
"and the installer window."
msgstr ""
"如果 ``Successfully installed certifi`` 和 ``update complete`` "
"字样出现在了终端的窗口中,那么安装就顺利完成。您可以关闭该终端窗口和安装器窗口。"
#: ../../using/mac.rst:108
msgid "A default install will include:"
msgstr "使用默认安装配置会安装下列内容:"
#: ../../using/mac.rst:110
msgid ""
"A |python_version_literal| folder in your :file:`Applications` folder. In "
"here you find :program:`IDLE`, the development environment that is a "
"standard part of official Python distributions; and :program:`Python "
"Launcher`, which handles double-clicking Python scripts from the macOS "
"`Finder <https://support.apple.com/en-us/HT201732>`_."
msgstr ""
"你的 :file:`Applications` 文件夹中的 |python_version_literal| 子文件夹。 你将在这里找到 "
":program:`IDLE`,这是作为官方 Python 发行版标准组件的开发环境;以及 :program:`Python "
"Launcher`,它负责处理在 macOS `Finder <https://support.apple.com/en-us/HT201732>`_ "
"中双击 Python 脚本的操作。"
#: ../../using/mac.rst:115
msgid ""
"A framework :file:`/Library/Frameworks/Python.framework`, which includes the"
" Python executable and libraries. The installer adds this location to your "
"shell path. To uninstall Python, you can remove these three things. Symlinks"
" to the Python executable are placed in :file:`/usr/local/bin/`."
msgstr ""
"一个框架 :file:`/Library/Frameworks/Python.framework`,它包括 Python 可执行文件和库。 "
"安装程序会将此位置添加到你的 shell 路径。 要卸载 Python,你可以移除这三样东西。 指向 Python 可执行文件的符号链接将位于 "
":file:`/usr/local/bin/`。"
#: ../../using/mac.rst:122
msgid ""
"Recent versions of macOS include a :command:`python3` command in "
":file:`/usr/bin/python3` that links to a usually older and incomplete "
"version of Python provided by and for use by the Apple development tools, "
":program:`Xcode` or the :program:`Command Line Tools for Xcode`. You should "
"never modify or attempt to delete this installation, as it is Apple-"
"controlled and is used by Apple-provided or third-party software. If you "
"choose to install a newer Python version from ``python.org``, you will have "
"two different but functional Python installations on your computer that can "
"co-exist. The default installer options should ensure that its "
":command:`python3` will be used instead of the system :command:`python3`."
msgstr ""
"最近几个版本的 macOS 都包括一个 :command:`python3` 命令 :file:`/usr/bin/python3`,它链接到一个供 "
"Apple 开发工具 :program:`Xcode` 或 :program:`Command Line Tools for Xcode` "
"使用的通常较老旧且不完整的 Python 版本。 你绝不应该修改或试图删除此安装版,因为它是由 Apple 控制且由 Apple "
"提供的或第三方的软件所使用。 如果你选择安装一个来自 ``python.org`` 的更新的 Python "
"版本,在你的计算机上将有两个不相同但均能正常运行的 Python 安装版共存。 默认安装程序选项应当会确保使用它的 :command:`python3`"
" 而不是系统的 :command:`python3`。"
#: ../../using/mac.rst:133
msgid "How to run a Python script"
msgstr "如何运行 Python 脚本"
#: ../../using/mac.rst:135
msgid ""
"There are two ways to invoke the Python interpreter. If you are familiar "
"with using a Unix shell in a terminal window, you can invoke "
"|python_x_dot_y_literal| or ``python3`` optionally followed by one or more "
"command line options (described in :ref:`using-on-general`). The Python "
"tutorial also has a useful section on :ref:`using Python interactively from "
"a shell <tut-interac>`."
msgstr ""
"有两种方式可以唤起 Python 解释器。 如果你熟悉如何在终端窗口中使用 Unix shell,你可以唤起 "
"|python_x_dot_y_literal| 或 ``python3`` 并可选择带一个或多个命令行选项(见 :ref:`using-on-"
"general` 中的说明)。 Python 教程也包含了一个有关 :ref:`通过 shell 交互式地使用 Python <tut-"
"interac>` 的实用章节。"
#: ../../using/mac.rst:142
msgid ""
"You can also invoke the interpreter through an integrated development "
"environment. :ref:`idle` is a basic editor and interpreter environment which"
" is included with the standard distribution of Python. :program:`IDLE` "
"includes a Help menu that allows you to access Python documentation. If you "
"are completely new to Python, you can read the tutorial introduction in that"
" document."
msgstr ""
"你也可以通过集成开发环境即 IDE 来唤起解释器。 :ref:`idle` 是一个包括在标准 Python 发行版中的具有基础功能的编辑器和解释器环境。"
" :program:`IDLE` 还包括一个 Help 菜单允许你访问 Python 文档。 如果你是完全的 Python "
"新手,你可以阅读此文档中的入门教程。"
#: ../../using/mac.rst:150
msgid ""
"There are many other editors and IDEs available, see :ref:`editors` for more"
" information."
msgstr "还有许多其他可用的编辑器和 IDE,请参阅 :ref:`editors` 了解详情。"
#: ../../using/mac.rst:153
msgid ""
"To run a Python script file from the terminal window, you can invoke the "
"interpreter with the name of the script file:"
msgstr "要在终端窗口运行一个 Python 脚本,你可以在唤起解释器时附带脚本文件名:"
#: ../../using/mac.rst:156
msgid "|python_x_dot_y_literal| ``myscript.py``"
msgstr "|python_x_dot_y_literal| ``myscript.py``"
#: ../../using/mac.rst:158
msgid "To run your script from the Finder, you can either:"
msgstr "要从 Finder (访达)运行你的脚本,你有两种选择:"
#: ../../using/mac.rst:160
msgid "Drag it to :program:`Python Launcher`."
msgstr "将其拖拽到 :program:`Python Launcher`。"
#: ../../using/mac.rst:162
msgid ""
"Select :program:`Python Launcher` as the default application to open your "
"script (or any ``.py`` script) through the Finder Info window and double-"
"click it. :program:`Python Launcher` has various preferences to control how "
"your script is launched. Option-dragging allows you to change these for one "
"invocation, or use its ``Preferences`` menu to change things globally."
msgstr ""
"选择 :program:`Python Launcher` 作为通过 Finder Info 窗口打开你的脚本(或任何 ``.py`` "
"脚本)和双击它时的默认应用程序。 :program:`Python Launcher` 具有多个首选项来控制脚本的启动方式。 "
"选项拖拽允许你为单次唤起更改这些首选项,或使用其 ``Preferences`` 菜单进行全局性的更改。"
#: ../../using/mac.rst:168
msgid ""
"Be aware that running the script directly from the macOS Finder might "
"produce different results than when running from a terminal window as the "
"script will not be run in the usual shell environment including any setting "
"of environment variables in shell profiles. And, as with any other script or"
" program, be certain of what you are about to run."
msgstr ""
"请注意从 macOS Finder 直接运行脚本可能产生与从终端窗口运行时不同的结果,因为脚本将不是在通常的包括了 shell 配置文件中所有环境变量的"
" shell 环境中运行。 因此,就如使用任何其他脚本或程序一样,请注意确认你想要运行的到底是什么。"
#: ../../using/mac.rst:178
msgid "Alternative Distributions"
msgstr "其他发行版"
#: ../../using/mac.rst:180
msgid ""
"Besides the standard ``python.org`` for macOS installer, there are third-"
"party distributions for macOS that may include additional functionality. "
"Some popular distributions and their key features:"
msgstr ""
"除了标准 ``python.org`` macOS 安装程序,还有一些针对 macOS 的包括附加功能的第三方发行版。 "
"以下是一些受欢迎的发行版及其关键特性:"
#: ../../using/mac.rst:184
msgid "`ActivePython <https://www.activestate.com/products/python/>`_"
msgstr "`ActivePython <https://www.activestate.com/products/python/>`_"
#: ../../using/mac.rst:185
msgid "Installer with multi-platform compatibility, documentation"
msgstr "具有多平台兼容性的安装器,文档"
#: ../../using/mac.rst:187
msgid "`Anaconda <https://www.anaconda.com/download/>`_"
msgstr "`Anaconda <https://www.anaconda.com/download/>`_"
#: ../../using/mac.rst:188
msgid ""
"Popular scientific modules (such as numpy, scipy, and pandas) and the "
"``conda`` package manager."
msgstr "流行的科学模块(如 numpy, scipy 和 pandas)以及 ``conda`` 包管理器。"
#: ../../using/mac.rst:191
msgid "`Homebrew <https://brew.sh>`_"
msgstr "`Homebrew <https://brew.sh>`_"
#: ../../using/mac.rst:192
msgid ""
"Package manager for macOS including multiple versions of Python and many "
"third-party Python-based packages (including numpy, scipy, and pandas)."
msgstr ""
"针对 macOS 的包管理器包括多个 Python 版本和许多基于 Python 的第三方包(包括 numpy, scipy 和 pandas)。"
#: ../../using/mac.rst:195
msgid "`MacPorts <https://www.macports.org>`_"
msgstr "`MacPorts <https://www.macports.org>`_"
#: ../../using/mac.rst:196
msgid ""
"Another package manager for macOS including multiple versions of Python and "
"many third-party Python-based packages. May include pre-built versions of "
"Python and many packages for older versions of macOS."
msgstr ""
"另一个针对 macOS 的包括多个 Python 版本和许多基于 Python 的第三方软件包的包管理器。 可能包括 Python "
"的预构建版和许多用于较旧版本 macOS 的软件包。"
#: ../../using/mac.rst:200
msgid ""
"Note that distributions might not include the latest versions of Python or "
"other libraries, and are not maintained or supported by the core Python "
"team."
msgstr "请注意这些发行版可能不包括 Python 或其他库的最新版本,并且不被核心 Python 团队所维护或支持。"
#: ../../using/mac.rst:206
msgid "Installing Additional Python Packages"
msgstr "安装额外的 Python 包"
#: ../../using/mac.rst:208
msgid "Refer to the `Python Packaging User Guide`_ for more information."
msgstr "请参阅 `Python Packaging User Guide`_ 了解详情。"
#: ../../using/mac.rst:218
msgid "GUI Programming"
msgstr "GUI 编程"
#: ../../using/mac.rst:220
msgid ""
"There are several options for building GUI applications on the Mac with "
"Python."
msgstr "使用 Python 在 Mac 上构建 GUI 应用程序有多种选择。"
#: ../../using/mac.rst:222
msgid ""
"The standard Python GUI toolkit is :mod:`tkinter`, based on the cross-"
"platform Tk toolkit (https://www.tcl.tk). A macOS-native version of Tk is "
"included with the installer."
msgstr ""
"标准的 Python GUI 工具包是 :mod:`tkinter`,基于跨平台的 Tk 工具包 (https://www.tcl.tk)。 "
"安装器包括了一个 macOS 原生版本的 Tk。"
#: ../../using/mac.rst:226
msgid ""
"*PyObjC* is a Python binding to Apple's Objective-C/Cocoa framework. "
"Information on PyObjC is available from :pypi:`pyobjc`."
msgstr ""
"*PyObjC* 是一个针对 Apple 的 Objective-C/Cocoa 框架的 Python 绑定。 有关 PyObjC 的信息可从 "
":pypi:`pyobjc` 获取。"
#: ../../using/mac.rst:229
msgid "A number of alternative macOS GUI toolkits are available including:"
msgstr "有多个替代性的 macOS GUI 工具包可供使用,包括:"
#: ../../using/mac.rst:231
msgid ""
"`PySide <https://www.qt.io/qt-for-python>`_: Official Python bindings to the"
" `Qt GUI toolkit <https://wiki.qt.io/Qt_for_Python>`_."
msgstr ""
"`PySide <https://www.qt.io/qt-for-python>`_: `Qt GUI 工具包 "
"<https://wiki.qt.io/Qt_for_Python>`_ 的官方 Python 绑定。"
#: ../../using/mac.rst:234
msgid ""
"`PyQt <https://riverbankcomputing.com/software/pyqt/>`_: Alternative Python "
"bindings to Qt."
msgstr ""
"`PyQt <https://riverbankcomputing.com/software/pyqt/>`_: Qt 的另一款 Python 绑定。"
#: ../../using/mac.rst:237
msgid ""
"`Kivy <https://kivy.org>`_: A cross-platform GUI toolkit that supports "
"desktop and mobile platforms."
msgstr "`Kivy <https://kivy.org>`_: 一款支持桌面和移动平台的跨平台 GUI 工具包。"
#: ../../using/mac.rst:240
msgid ""
"`Toga <https://toga.readthedocs.io>`_: Part of the `BeeWare Project "
"<https://beeware.org>`_; supports desktop, mobile, web and console apps."
msgstr ""
"`Toga <https://toga.readthedocs.io>`_: `BeeWare 项目 <https://beeware.org>`_ "
"的一部分;支持桌面、移动设备、Web 和控制台应用。"
#: ../../using/mac.rst:243
msgid ""
"`wxPython <https://wxpython.org>`_: A cross-platform toolkit that supports "
"desktop operating systems."
msgstr "`wxPython <https://wxpython.org>`_: 一款支持桌面操作系统的跨平台工具包。"
#: ../../using/mac.rst:248
msgid "Advanced Topics"
msgstr "进阶"
#: ../../using/mac.rst:253
msgid "Installing Free-threaded Binaries"
msgstr "安装自由线程二进制文件"
#: ../../using/mac.rst:257
msgid ""
"The ``python.org`` :ref:`Python for macOS <getting-and-installing-"
"macpython>` installer package can optionally install an additional build of "
"Python |version| that supports :pep:`703`, the free-threading feature "
"(running with the :term:`global interpreter lock` disabled). Check the "
"release page on ``python.org`` for possible updated information."
msgstr ""
"``python.org`` 的 :ref:`macOS 版 Python <getting-and-installing-macpython>` "
"安装程序可以选择安装支持 :pep:`703` 的附加 Python |version| 构建版,即试验性的自由线程特性(在禁用 "
":term:`global interpreter lock` 的情况下运行)。 请查找 ``python.org`` 发布页获取可能的更新信息。"
#: ../../using/mac.rst:263
msgid ""
"The free-threaded mode is working and continues to be improved, but there is"
" some additional overhead in single-threaded workloads compared to the "
"regular build. Additionally, third-party packages, in particular ones with "
"an :term:`extension module`, may not be ready for use in a free-threaded "
"build, and will re-enable the :term:`GIL`. Therefore, the support for free-"
"threading is not installed by default. It is packaged as a separate install "
"option, available by clicking the **Customize** button on the **Installation"
" Type** step of the installer as described above."
msgstr ""
"自由线程模式目前可用并在不断改进,但与常规构建相比,单线程工作负载会产生一些额外的开销。 此外,第三方软件包,特别是带有 "
":term:`extension module` 的软件包,可能无法在自由线程构建中使用,并将重新启用 :term:`GIL`。 "
"因此,默认情况下不安装对自由线程的支持。 它被打包为一个单独的安装选项,可以通过单击安装程序 **安装类型** 步骤上的 **自定义** "
"按钮来使用,如上所述。"
#: ../../using/mac.rst:275
msgid ""
"If the box next to the **Free-threaded Python** package name is checked, a "
"separate :file:`PythonT.framework` will also be installed alongside the "
"normal :file:`Python.framework` in :file:`/Library/Frameworks`. This "
"configuration allows a free-threaded Python |version| build to co-exist on "
"your system with a traditional (GIL only) Python |version| build with "
"minimal risk while installing or testing. This installation layout may "
"change in future releases."
msgstr ""
"如果 **Free-threaded Python** 包名称对应的复选框被勾选,则会将单独的 :file:`PythonT.framework` "
"与普通的 :file:`Python.framework` 一同安装到 :file:`/Library/Frameworks` 中。 "
"此配置允许自由线程的 Python |version| 构建版在你的系统上与传统的(限定 GIL 的)Python |version| "
"构建版共存并让安装或测试时的风险最小化。 这个安装布局本身是实验性的因而可能在未来发布版中发生变化。"
#: ../../using/mac.rst:283
msgid "Known cautions and limitations:"
msgstr "已知的注意事项和限制:"
#: ../../using/mac.rst:285
msgid ""
"The **UNIX command-line tools** package, which is selected by default, will "
"install links in :file:`/usr/local/bin` for |python_x_dot_y_t_literal|, the "
"free-threaded interpreter, and |python_x_dot_y_t_literal_config|, a "
"configuration utility which may be useful for package builders. Since "
":file:`/usr/local/bin` is typically included in your shell ``PATH``, in most"
" cases no changes to your ``PATH`` environment variables should be needed to"
" use |python_x_dot_y_t_literal|."
msgstr ""
"默认选中的 **UNIX command-line tools** 软件包将在 :file:`/usr/local/bin` 中安装链接指向 "
"|python_x_dot_y_t_literal|,即自由线程的解释器,以及 "
"|python_x_dot_y_t_literal_config|,一款对软件包构建者来说很有用处的工具。 由于 "
":file:`/usr/local/bin` 通常会包括在你的 shell ``PATH`` 中,在大多数情况下应该都不需要修改你的 ``PATH`` "
"环境变量即可使用 |python_x_dot_y_t_literal|。"
#: ../../using/mac.rst:293
msgid ""
"For this release, the **Shell profile updater** package and the "
":file:`Update Shell Profile.command` in "
"|applications_python_version_literal| do not support the free-threaded "
"package."
msgstr ""
"对于本发布版,**Shell profile updater** 软件包和 |applications_python_version_literal| "
"中的 :file:`Update Shell Profile.command` 均不支持自由线程的软件包。"
#: ../../using/mac.rst:297
msgid ""
"The free-threaded build and the traditional build have separate search paths"
" and separate :file:`site-packages` directories so, by default, if you need "
"a package available in both builds, it may need to be installed in both. The"
" free-threaded package will install a separate instance of :program:`pip` "
"for use with |python_x_dot_y_t_literal|."
msgstr ""
"自由线程构建版和传统构建版具有不同的搜索路径和不同的 :file:`site-packages` "
"目录,因此在默认情况下,如果你需要让某个包在两个构建版中均可用,可能需要在两版中都安装。 自由线程的软件包将安装单独的 :program:`pip` "
"来配合 |python_x_dot_y_t_literal| 使用。"
#: ../../using/mac.rst:303
msgid "To install a package using :command:`pip` without a :command:`venv`:"
msgstr "不带 :command:`venv` 地使用 :command:`pip` 来安装软件包:"
#: ../../using/mac.rst:307
msgid "python\\ |version|\\ t -m pip install <package_name>"
msgstr "python\\ |version|\\ t -m pip install <package_name>"
#: ../../using/mac.rst:309
msgid ""
"When working with multiple Python environments, it is usually safest and "
"easiest to :ref:`create and use virtual environments <tut-venv>`. This can "
"avoid possible command name conflicts and confusion about which Python is in"
" use:"
msgstr ""
"在操作多个 Python 环境时,:ref:`创建和使用虚拟环境 <tut-venv>` 通常是最安全和便捷的方式。 "
"这可以避免可能的命令名称冲突和究竟是哪个 Python 正在被使用的困惑:"
#: ../../using/mac.rst:315
msgid "python\\ |version|\\ t -m venv <venv_name>"
msgstr "python\\ |version|\\ t -m venv <venv_name>"
#: ../../using/mac.rst:318
msgid "then :command:`activate`."
msgstr "然后执行 :command:`activate`。"
#: ../../using/mac.rst:320
msgid "To run a free-threaded version of IDLE:"
msgstr "要运行 IDLE 的自由线程版本:"
#: ../../using/mac.rst:324
msgid "python\\ |version|\\ t -m idlelib"
msgstr "python\\ |version|\\ t -m idlelib"
#: ../../using/mac.rst:327
msgid ""
"The interpreters in both builds respond to the same :ref:`PYTHON environment"
" variables <using-on-envvars>` which may have unexpected results, for "
"example, if you have ``PYTHONPATH`` set in a shell profile. If necessary, "
"there are :ref:`command line options <using-on-interface-options>` like "
"``-E`` to ignore these environment variables."
msgstr ""
"两个构建版中的解释器响应相同的 :ref:`PYTHON 环境变量 <using-on-envvars>` 可能导致预料之外的结果,举例来说,如果你在 "
"shell 配置文件中设置了 ``PYTHONPATH`` 的话。 如有必要,可以使用像 ``-E`` 这样的 :ref:`命令行选项 <using-"
"on-interface-options>` 来忽略这些环境变量。"
#: ../../using/mac.rst:334
msgid ""
"The free-threaded build links to the third-party shared libraries, such as "
"``OpenSSL`` and ``Tk``, installed in the traditional framework. This means "
"that both builds also share one set of trust certificates as installed by "
"the :command:`Install Certificates.command` script, thus it only needs to be"
" run once."
msgstr ""
"自由线程构建版会链接安装在传统框架中的第三方共享库,如 ``OpenSSL`` 和 ``Tk``。 这意味着两个构建版还会共享同一个由 "
":command:`Install Certificates.command` 脚本所安装的信任证书,因此它只须运行一次。"
#: ../../using/mac.rst:340
msgid ""
"If you cannot depend on the link in ``/usr/local/bin`` pointing to the "
"``python.org`` free-threaded |python_x_dot_y_t_literal| (for example, if you"
" want to install your own version there or some other distribution does), "
"you can explicitly set your shell ``PATH`` environment variable to include "
"the ``PythonT`` framework ``bin`` directory:"
msgstr ""
"如果你不能依赖 ``/usr/local/bin`` 中指向 ``python.org`` 自由线程 "
"|python_x_dot_y_t_literal| 的链接(举例来说,如果你想在其中安装你自己的版本或者其他发行版要这样做),你可以显式设置你的 "
"``PATH`` 环境变量以包括 ``PythonT`` 框架的 ``bin`` 目录:"
#: ../../using/mac.rst:348
msgid ""
"export PATH=\"/Library/Frameworks/PythonT.framework/Versions/\\ |version|\\ "
"/bin\":\"$PATH\""
msgstr ""
"export PATH=\"/Library/Frameworks/PythonT.framework/Versions/\\ |version|\\ "
"/bin\":\"$PATH\""
#: ../../using/mac.rst:350
msgid ""
"The traditional framework installation by default does something similar, "
"except for :file:`Python.framework`. Be aware that having both framework "
"``bin`` directories in ``PATH`` can lead to confusion if there are duplicate"
" names like |python_x_dot_y_literal| in both; which one is actually used "
"depends on the order they appear in ``PATH``. The ``which python3.x`` or "
"``which python3.xt`` commands can show which path is being used. Using "
"virtual environments can help avoid such ambiguities. Another option might "
"be to create a shell :command:`alias` to the desired interpreter, like:"
msgstr ""
"传统框架安装版默认会做类似的事情,但 :file:`Python.framework` 除外。 请注意将两个框架的 ``bin`` 目录都放入 "
"``PATH`` 在存在重名如 |python_x_dot_y_literal| 时可能会导致混淆;实际是使用哪一个取决于它们在 ``PATH`` "
"中的出现顺序。 ``which python3.x`` 或 ``which python3.xt`` 命令可以显示正在使用哪个路径。 "
"使用虚拟环境有助于避免这样的歧义。 另一种选项是创建一个 shell :command:`alias` 指向特定解释器,例如:"
#: ../../using/mac.rst:361
msgid ""
"alias py\\ |version|\\ =\"/Library/Frameworks/Python.framework/Versions/\\ |version|\\ /bin/python\\ |version|\\ \"\n"
"alias py\\ |version|\\ t=\"/Library/Frameworks/PythonT.framework/Versions/\\ |version|\\ /bin/python\\ |version|\\ t\""
msgstr ""
"alias py\\ |version|\\ =\"/Library/Frameworks/Python.framework/Versions/\\ |version|\\ /bin/python\\ |version|\\ \"\n"
"alias py\\ |version|\\ t=\"/Library/Frameworks/PythonT.framework/Versions/\\ |version|\\ /bin/python\\ |version|\\ t\""
#: ../../using/mac.rst:365
msgid "Installing using the command line"
msgstr "使用命令行安装"
#: ../../using/mac.rst:367
msgid ""
"If you want to use automation to install the ``python.org`` installer "
"package (rather than by using the familiar macOS :program:`Installer` GUI "
"app), the macOS command line :command:`installer` utility lets you select "
"non-default options, too. If you are not familiar with :command:`installer`,"
" it can be somewhat cryptic (see :command:`man installer` for more "
"information). As an example, the following shell snippet shows one way to do"
" it, using the |x_dot_y_b2_literal| release and selecting the free-threaded "
"interpreter option:"
msgstr ""
"如果你想使用自动方式来安装 ``python.org`` installer 软件包(而不是使用熟悉的 macOS "
":program:`Installer` GUI 应用),macOS 命令行 :command:`installer` 工具也允许你选择非默认选项。 "
"如果你不熟悉 :command:`installer`,它可能令人感到迷惑(请参阅 :command:`man installer` 了解详情)。 "
"作为样例,下面的 shell 代码片段显示了其中一种做法,使用 |x_dot_y_b2_literal| 发布版并选择自由线程解释器选项:"
#: ../../using/mac.rst:378
msgid ""
"RELEASE=\"python-\\ |version|\\ 0b2-macos11.pkg\"\n"
"\n"
"# download installer pkg\n"
"curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n"
"\n"
"# create installer choicechanges to customize the install:\n"
"# enable the PythonTFramework-\\ |version|\\ package\n"
"# while accepting the other defaults (install all other packages)\n"
"cat > ./choicechanges.plist <<EOF\n"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"\\http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
"<plist version=\"1.0\">\n"
"<array>\n"
" <dict>\n"
" <key>attributeSetting</key>\n"
" <integer>1</integer>\n"
" <key>choiceAttribute</key>\n"
" <string>selected</string>\n"
" <key>choiceIdentifier</key>\n"
" <string>org.python.Python.PythonTFramework-\\ |version|\\ </string>\n"
" </dict>\n"
"</array>\n"
"</plist>\n"
"EOF\n"
"\n"
"sudo installer -pkg ./${RELEASE} -applyChoiceChangesXML ./choicechanges.plist -target /"
msgstr ""
"RELEASE=\"python-\\ |version|\\ 0b2-macos11.pkg\"\n"
"\n"
"# download installer pkg\n"
"curl -O \\https://www.python.org/ftp/python/\\ |version|\\ .0/${RELEASE}\n"
"\n"
"# create installer choicechanges to customize the install:\n"
"# enable the PythonTFramework-\\ |version|\\ package\n"
"# while accepting the other defaults (install all other packages)\n"
"cat > ./choicechanges.plist <<EOF\n"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"\\http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
"<plist version=\"1.0\">\n"
"<array>\n"
" <dict>\n"
" <key>attributeSetting</key>\n"
" <integer>1</integer>\n"
" <key>choiceAttribute</key>\n"
" <string>selected</string>\n"
" <key>choiceIdentifier</key>\n"
" <string>org.python.Python.PythonTFramework-\\ |version|\\ </string>\n"
" </dict>\n"
"</array>\n"
"</plist>\n"
"EOF\n"
"\n"
"sudo installer -pkg ./${RELEASE} -applyChoiceChangesXML ./choicechanges.plist -target /"
#: ../../using/mac.rst:406
msgid ""
"You can then test that both installer builds are now available with "
"something like:"
msgstr "接下来你可以这样测试两个安装器构建版现在是否可用:"
#: ../../using/mac.rst:410
msgid ""
"$ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled\n"
"$ /usr/local/bin/python\\ |version|\\ t -VV\n"
"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ # and the traditional interpreter\n"
"$ /usr/local/bin/python\\ |version|\\ -VV\n"
"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ # test that they are also available without the prefix if /usr/local/bin is on $PATH\n"
"$ python\\ |version|\\ t -VV\n"
"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ python\\ |version|\\ -VV\n"
"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]"
msgstr ""
"$ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled\n"
"$ /usr/local/bin/python\\ |version|\\ t -VV\n"
"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ # and the traditional interpreter\n"
"$ /usr/local/bin/python\\ |version|\\ -VV\n"
"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ # test that they are also available without the prefix if /usr/local/bin is on $PATH\n"
"$ python\\ |version|\\ t -VV\n"
"Python \\ |version|\\ .0b2 free-threading build (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]\n"
"$ python\\ |version|\\ -VV\n"
"Python \\ |version|\\ .0b2 (v\\ |version|\\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]"
#: ../../using/mac.rst:424
msgid ""
"Current ``python.org`` installers only install to fixed locations like "
":file:`/Library/Frameworks/`, :file:`/Applications`, and "
":file:`/usr/local/bin`. You cannot use the :command:`installer` ``-domain`` "
"option to install to other locations."
msgstr ""
"当前的 ``python.org`` 安装器只会安装到固定位置如 :file:`/Library/Frameworks/`, "
":file:`/Applications` 和 :file:`/usr/local/bin`。 你不能使用 :command:`installer` "
"``-domain`` 选项来安装到其他位置。"
#: ../../using/mac.rst:432
msgid "Distributing Python Applications"
msgstr "分发 Python 应用程序"
#: ../../using/mac.rst:434
msgid ""
"A range of tools exist for converting your Python code into a standalone "
"distributable application:"
msgstr "有一系列工具可将你的 Python 代码转换为独立发布的应用程序:"
#: ../../using/mac.rst:437
msgid ""
":pypi:`py2app`: Supports creating macOS ``.app`` bundles from a Python "
"project."
msgstr ":pypi:`py2app`: 支持基于 Python 项目创建 macOS ``.app`` 软件包。"
#: ../../using/mac.rst:440
msgid ""
"`Briefcase <https://briefcase.readthedocs.io>`_: Part of the `BeeWare "
"Project <https://beeware.org>`_; a cross-platform packaging tool that "
"supports creation of ``.app`` bundles on macOS, as well as managing signing "
"and notarization."
msgstr ""
"`Briefcase <https://briefcase.readthedocs.io>`_: `BeeWare 项目 "
"<https://beeware.org>`_ 的一部分;一款支持在 macOS 上创建 ``.app`` 捆绑包,并能管理签名和公证的跨平台打包工具。"
#: ../../using/mac.rst:445
msgid ""
"`PyInstaller <https://pyinstaller.org/>`_: A cross-platform packaging tool "
"that creates a single file or folder as a distributable artifact."
msgstr ""
"`PyInstaller <https://pyinstaller.org/>`_: 一款可创建单独文件或文件夹作为可分发包的跨平台打包工具。"
#: ../../using/mac.rst:449
msgid "App Store Compliance"
msgstr "App Store 合规性"
#: ../../using/mac.rst:451
msgid ""
"Apps submitted for distribution through the macOS App Store must pass "
"Apple's app review process. This process includes a set of automated "
"validation rules that inspect the submitted application bundle for "
"problematic code."
msgstr ""
"在 macOS App Store 中提交发布的 app 必须通过 Apple 的 app 审核进程。 "
"此进程包括一组在所提交的应用程序包中自动检查有问题代码的验证规则。"
#: ../../using/mac.rst:455
msgid ""
"The Python standard library contains some code that is known to violate "
"these automated rules. While these violations appear to be false positives, "
"Apple's review rules cannot be challenged. Therefore, it is necessary to "
"modify the Python standard library for an app to pass App Store review."
msgstr ""
"Python 标准库包含了一些已知会违反这些自动规则的代码。 虽然这些违规情况看来是属于误报,但 Apple 的审核规则是不可挑战的。 因此,有必要修改"
" Python 标准库以便 app 能够通过 App Store 的审核。"
#: ../../using/mac.rst:460
msgid ""
"The Python source tree contains :source:`a patch file <Mac/Resources/app-"
"store-compliance.patch>` that will remove all code that is known to cause "
"issues with the App Store review process. This patch is applied "
"automatically when CPython is configured with the :option:`--with-app-store-"
"compliance` option."
msgstr ""
"Python 源代码树包含 :source:`一个补丁文件 <Mac/Resources/app-store-compliance.patch>` "
"可移除所有已知的会导致 App Store 审核过程出现问题的代码。 这个补丁会在 CPython 配置了 :option:`--with-app-"
"store-compliance` 选项时自动应用。"
#: ../../using/mac.rst:466
msgid ""
"This patch is not normally required to use CPython on a Mac; nor is it "
"required if you are distributing an app *outside* the macOS App Store. It is"
" *only* required if you are using the macOS App Store as a distribution "
"channel."
msgstr ""
"这个补丁对于在 Mac 上使用 CPython 并不是必需的;如果你是在 macOS App Store *以外* 的地方发布 app 它也不是必需的。"
" 它 *只有* 在你使用 macOS App Store 作为发布渠道时才是必需的。"
#: ../../using/mac.rst:471
msgid "Other Resources"
msgstr "其他资源"
#: ../../using/mac.rst:473
msgid ""
"The `python.org Help page <https://www.python.org/about/help/>`_ has links "
"to many useful resources. The `Pythonmac-SIG mailing list "
"<https://www.python.org/community/sigs/current/pythonmac-sig/>`_ is another "
"support resource specifically for Python users and developers on the Mac."
msgstr ""
"`python.org Help 页面 <https://www.python.org/about/help/>`_ 包含许多有用资源的链接。 "
"`Pythonmac-SIG 邮件列表 "
"<https://www.python.org/community/sigs/current/pythonmac-sig/>`_ 是另一个专门针对 "
"Mac 上的 Python 用户和开发者的支持资源。"