@@ -40,13 +40,20 @@ msgid ""
40
40
"packages in the base environment, so only those explicitly installed in the "
41
41
"virtual environment are available."
42
42
msgstr ""
43
+ ":mod:`!venv` モジュールは、軽量な仮想環境の作成を行います。それぞれの仮想環境"
44
+ "は、:mod:`site` ディレクトリに独立した Python パッケージの集合を持っていま"
45
+ "す。仮想環境は、ベース Python とも呼ばれる、すでにインストールされている "
46
+ "Python の上に作成され、明示的にインストールしたパッケージのみが利用可能となる"
47
+ "よう、ベース Python から隔離することもできます。"
43
48
44
49
#: ../../library/venv.rst:29
45
50
msgid ""
46
51
"When used from within a virtual environment, common installation tools such "
47
52
"as `pip`_ will install Python packages into a virtual environment without "
48
53
"needing to be told to do so explicitly."
49
54
msgstr ""
55
+ "仮想環境の中から使われると、`pip`_ のような一般的なインストールツールは明示"
56
+ "的に指定しなくても仮想環境に Python パッケージをインストールします。"
50
57
51
58
#: ../../library/venv.rst:33
52
59
msgid "See :pep:`405` for more background on Python virtual environments."
@@ -104,11 +111,13 @@ msgid ""
104
111
"``pyvenv`` was the recommended tool for creating virtual environments for "
105
112
"Python 3.3 and 3.4, and is :ref:`deprecated in Python 3.6 <whatsnew36-venv>`."
106
113
msgstr ""
114
+ "Python 3.3 と 3.4 では仮想環境の作成に ``pyvenv`` が推奨されていましたが、:"
115
+ "ref:`Python 3.6 で非推奨になりました<whatsnew36-venv>`。"
107
116
108
117
#: ../../using/venv-create.inc:22
109
118
msgid ""
110
119
"The use of ``venv`` is now recommended for creating virtual environments."
111
- msgstr "仮想環境の作成には、 ``venv`` の使用をお勧めします 。"
120
+ msgstr "仮想環境の作成には、 ``venv`` の使用が今は推奨されています 。"
112
121
113
122
#: ../../using/venv-create.inc:27
114
123
msgid "On Windows, invoke the ``venv`` command as follows::"
@@ -133,6 +142,8 @@ msgid ""
133
142
"Add ``--upgrade-deps`` option to upgrade pip + setuptools to the latest on "
134
143
"PyPI"
135
144
msgstr ""
145
+ "pip と setuptools を PyPI での最新版に更新するには、``--upgrade-deps`` オプ"
146
+ "ションを追加してください。"
136
147
137
148
#: ../../using/venv-create.inc:73
138
149
msgid ""
@@ -216,7 +227,7 @@ msgstr ""
216
227
217
228
#: ../../library/venv.rst:48
218
229
msgid "How venvs work"
219
- msgstr ""
230
+ msgstr "仮想環境のしくみ "
220
231
221
232
#: ../../library/venv.rst:50
222
233
msgid ""
@@ -227,6 +238,11 @@ msgid ""
227
238
"environment. It is sufficient to check ``sys.prefix == sys.base_prefix`` to "
228
239
"determine if the current interpreter is running from a virtual environment."
229
240
msgstr ""
241
+ "Python インタプリタが仮想環境で実行しているとき、:data:`sys.prefix` と :data:"
242
+ "`sys.exec_prefix` は仮想環境のディレクトリを指し示し、 :data:`sys."
243
+ "base_prefix` と :data:`sys.base_exec_prefix` は仮想環境の作成に使われたベー"
244
+ "ス Python のディレクトリを指し示します。``sys.prefix == sys.base_prefix`` を"
245
+ "調べれば、現在のインタプリタが仮想環境で実行しているかを判定できます。"
230
246
231
247
#: ../../library/venv.rst:59
232
248
msgid ""
@@ -238,6 +254,14 @@ msgid ""
238
254
"activation script is platform-specific (:samp:`{<venv>}` must be replaced by "
239
255
"the path to the directory containing the virtual environment):"
240
256
msgstr ""
257
+ "仮想環境は、そのバイナリディレクトリ (POSIX では ``bin``、Windows では "
258
+ "``Scripts``) の中にあるスクリプトを使って「アクティベート (activate)」するこ"
259
+ "とができます。この操作はそのディレクトリを :envvar:`!PATH` の先頭に追加するの"
260
+ "で、:program:`!python` を実行すると仮想環境の Python インタプリタが実行され、"
261
+ "フルパスを使わなくても仮想環境にインストールされたスクリプトを実行できます。"
262
+ "アクティベートするスクリプトの呼び出し方はプラットフォームによって異なります "
263
+ "(:samp:`{<venv>}` は仮想環境の入ったディレクトリへのパスで置き換えてくださ"
264
+ "い)。"
241
265
242
266
#: ../../library/venv.rst:69
243
267
msgid "Platform"
@@ -261,31 +285,31 @@ msgstr "bash/zsh"
261
285
262
286
#: ../../library/venv.rst:71
263
287
msgid ":samp:`$ source {<venv>}/bin/activate`"
264
- msgstr ""
288
+ msgstr ":samp:`$ source {<venv>}/bin/activate` "
265
289
266
290
#: ../../library/venv.rst:73
267
291
msgid "fish"
268
292
msgstr "fish"
269
293
270
294
#: ../../library/venv.rst:73
271
295
msgid ":samp:`$ source {<venv>}/bin/activate.fish`"
272
- msgstr ""
296
+ msgstr ":samp:`$ source {<venv>}/bin/activate.fish` "
273
297
274
298
#: ../../library/venv.rst:75
275
299
msgid "csh/tcsh"
276
300
msgstr "csh/tcsh"
277
301
278
302
#: ../../library/venv.rst:75
279
303
msgid ":samp:`$ source {<venv>}/bin/activate.csh`"
280
- msgstr ""
304
+ msgstr ":samp:`$ source {<venv>}/bin/activate.csh` "
281
305
282
306
#: ../../library/venv.rst:77 ../../library/venv.rst:81
283
307
msgid "PowerShell"
284
308
msgstr "PowerShell"
285
309
286
310
#: ../../library/venv.rst:77
287
311
msgid ":samp:`$ {<venv>}/bin/Activate.ps1`"
288
- msgstr ""
312
+ msgstr ":samp:`$ {<venv>}/bin/Activate.ps1` "
289
313
290
314
#: ../../library/venv.rst:79
291
315
msgid "Windows"
@@ -297,11 +321,11 @@ msgstr "cmd.exe"
297
321
298
322
#: ../../library/venv.rst:79
299
323
msgid ":samp:`C:\\\\ > {<venv>}\\\\ Scripts\\\\ activate.bat`"
300
- msgstr ""
324
+ msgstr ":samp:`C: \\\\ > {<venv>} \\\\ Scripts \\\\ activate.bat` "
301
325
302
326
#: ../../library/venv.rst:81
303
327
msgid ":samp:`PS C:\\\\ > {<venv>}\\\\ Scripts\\\\ Activate.ps1`"
304
- msgstr ""
328
+ msgstr ":samp:`PS C: \\\\ > {<venv>} \\\\ Scripts \\\\ Activate.ps1` "
305
329
306
330
#: ../../library/venv.rst:84
307
331
msgid ":program:`!fish` and :program:`!csh` activation scripts."
@@ -322,6 +346,10 @@ msgid ""
322
346
"invoking Python. Furthermore, all scripts installed in the environment "
323
347
"should be runnable without activating it."
324
348
msgstr ""
349
+ "Python を呼び出すときに仮想環境の Python インタプリタへのフルパスを指定すれば"
350
+ "良いだけなので、仮想環境をアクティベートする*必要*はありません。さらに、仮想"
351
+ "環境にインストールされたすべてのスクリプトはアクティベートせずとも実行可能な"
352
+ "はずです。"
325
353
326
354
#: ../../library/venv.rst:97
327
355
msgid ""
@@ -334,6 +362,14 @@ msgid ""
334
362
"Explorer window should run it with the correct interpreter without the "
335
363
"environment needing to be activated or on the :envvar:`!PATH`."
336
364
msgstr ""
365
+ "これを達成するため、仮想環境にインストールされたスクリプトは、仮想環境の "
366
+ "Python インタプリタを指し示す \" shebang\" の行を含みます i.e. :samp:`#!/"
367
+ "{<path-to-venv>}/bin/python` 。つまり、:envvar:`!PATH` の値に関係なくそのスク"
368
+ "リプトはそのインタプリタを使って実行されます。Windows では、\" shebang\" の行"
369
+ "の処理は :ref:`launcher` がインストールされていれば可能です。したがって、"
370
+ "Windows のエクスプローラのウィンドウで、インストールされたスクリプトをダブル"
371
+ "クリックすると、仮想環境をアクティベートしたり :envvar:`!PATH` を編集したりし"
372
+ "なくても、正しいインタプリタでスクリプトが実行されるはずです。"
337
373
338
374
#: ../../library/venv.rst:106
339
375
msgid ""
@@ -343,6 +379,10 @@ msgid ""
343
379
"VIRTUAL_ENV` cannot be relied upon to determine whether a virtual "
344
380
"environment is being used."
345
381
msgstr ""
382
+ "仮想環境がアクティベートされると、:envvar:`!VIRTUAL_ENV` 環境変数の値が仮想環"
383
+ "境へのパスに設定されます。アクティベートしなくても仮想環境を使うことは可能な"
384
+ "ため、仮想環境が使われているか否かの判断を :envvar:`!VIRTUAL_ENV` に頼ること"
385
+ "はできません。"
346
386
347
387
#: ../../library/venv.rst:112
348
388
msgid ""
@@ -359,6 +399,18 @@ msgid ""
359
399
"directory of it, you should recreate the environment in its new location. "
360
400
"Otherwise, software installed into the environment may not work as expected."
361
401
msgstr ""
402
+ "仮想環境にインストールされたスクリプトは仮想環境がアクティベートされているこ"
403
+ "とを前提とすべきではないため、shebang の行は仮想環境のインタプリタへの絶対パ"
404
+ "スを含みます。このため、本質的に、仮想環境は一般の場合ポータブルではありませ"
405
+ "ん。いつでも仮想環境を再作成できる簡単な方法を持っておくべきです(例えば、"
406
+ "``requirements.txt`` という requirements ファイルがあれば、仮想環境の "
407
+ "``pip`` を用いて、``pip install -r requirements.txt`` を呼び出すことで、仮想"
408
+ "環境が必要とするすべてのパッケージをインストールできます)。何らかの理由で仮"
409
+ "想環境を別の場所に移動する必要がある場合は、新しい場所で仮想環境を再作成し、"
410
+ "古い場所にある仮想環境を削除してください。仮想環境の親ディレクトリを移動した"
411
+ "ため仮想環境も移動された場合は、新しい場所で仮想環境を再作成する必要がありま"
412
+ "す。さもなくば、仮想環境にインストールされたソフトウェアが想定通りに動作しな"
413
+ "い可能性があります。"
362
414
363
415
#: ../../library/venv.rst:126
364
416
msgid ""
@@ -444,10 +496,16 @@ msgid ""
444
496
"used). If the special string ``\" .\" `` is provided, the basename of the "
445
497
"current directory is used as the prompt."
446
498
msgstr ""
499
+ "``prompt`` -- 仮想環境がアクティベートされたときに使う文字列(デフォルトは "
500
+ "``None`` のため、仮想環境のディレクトリ名が使われます)。もし特殊な文字列 "
501
+ "``\" .\" `` が渡された場合、カレントディレクトリのベース名がプロンプトとして用"
502
+ "いられます。"
447
503
448
504
#: ../../library/venv.rst:171
449
505
msgid "``upgrade_deps`` -- Update the base venv modules to the latest on PyPI"
450
506
msgstr ""
507
+ "``upgrade_deps`` -- venv のベースのモジュールを PyPI での最新版にアップデート"
508
+ "します。"
451
509
452
510
#: ../../library/venv.rst:173 ../../library/venv.rst:348
453
511
msgid "Added the ``with_pip`` parameter"
@@ -513,82 +571,111 @@ msgid ""
513
571
"of the environment directory will be cleared and then all necessary "
514
572
"subdirectories will be recreated."
515
573
msgstr ""
574
+ "仮想環境のディレクトリとすべての必要なサブディレクトリのうちまだ存在しないも"
575
+ "のを作成し、コンテキストオブジェクトを返します。このコンテキストオブジェクト"
576
+ "は他のメソッドで使うために(パスなどの)属性を保持しているだけです。もし :"
577
+ "class:`EnvBuilder` が ``clear=True`` の引数で作成された場合、仮想環境のディレ"
578
+ "クトリの中身は消去され、すべての必要なサブディレクトリが再作成されます。"
516
579
517
580
#: ../../library/venv.rst:223
518
581
msgid ""
519
582
"The returned context object is a :class:`types.SimpleNamespace` with the "
520
583
"following attributes:"
521
584
msgstr ""
585
+ "返されるコンテキストオブジェクトは以下の属性を持った :class:`types."
586
+ "SimpleNamespace` です:"
522
587
523
588
#: ../../library/venv.rst:226
524
589
msgid ""
525
590
"``env_dir`` - The location of the virtual environment. Used for "
526
591
"``__VENV_DIR__`` in activation scripts (see :meth:`install_scripts`)."
527
592
msgstr ""
593
+ "``env_dir`` - 仮想環境の場所。アクティベートスクリプトの中の "
594
+ "``__VENV_DIR__`` で使われます(:meth:`install_scripts` を参照してください)。"
528
595
529
596
#: ../../library/venv.rst:229
530
597
msgid ""
531
598
"``env_name`` - The name of the virtual environment. Used for "
532
599
"``__VENV_NAME__`` in activation scripts (see :meth:`install_scripts`)."
533
600
msgstr ""
601
+ "``env_name`` - 仮想環境の名前。アクティベートスクリプトの中の "
602
+ "``__VENV_NAME__`` で使われます(:meth:`install_scripts` を参照してくださ"
603
+ "い)。"
534
604
535
605
#: ../../library/venv.rst:232
536
606
msgid ""
537
607
"``prompt`` - The prompt to be used by the activation scripts. Used for "
538
608
"``__VENV_PROMPT__`` in activation scripts (see :meth:`install_scripts`)."
539
609
msgstr ""
610
+ "``prompt`` - アクティベートスクリプトで使われるプロンプト。アクティベートスク"
611
+ "リプトの中の ``__VENV_PROMPT__`` で使われます(:meth:`install_scripts` を参照"
612
+ "してください)。"
540
613
541
614
#: ../../library/venv.rst:235
542
615
msgid ""
543
616
"``executable`` - The underlying Python executable used by the virtual "
544
617
"environment. This takes into account the case where a virtual environment is "
545
618
"created from another virtual environment."
546
619
msgstr ""
620
+ "``executable`` - 仮想環境の元になっている Python 実行可能ファイル。これは仮想"
621
+ "環境が別の仮想環境から作られた場合も考慮に入れます。"
547
622
548
623
#: ../../library/venv.rst:239
549
624
msgid "``inc_path`` - The include path for the virtual environment."
550
- msgstr ""
625
+ msgstr "``inc_path`` - 仮想環境の include パス。 "
551
626
552
627
#: ../../library/venv.rst:241
553
628
msgid "``lib_path`` - The purelib path for the virtual environment."
554
- msgstr ""
629
+ msgstr "``lib_path`` - 仮想環境の purelib パス。 "
555
630
556
631
#: ../../library/venv.rst:243
557
632
msgid "``bin_path`` - The script path for the virtual environment."
558
- msgstr ""
633
+ msgstr "``bin_path`` - 仮想環境のスクリプトのパス。 "
559
634
560
635
#: ../../library/venv.rst:245
561
636
msgid ""
562
637
"``bin_name`` - The name of the script path relative to the virtual "
563
638
"environment location. Used for ``__VENV_BIN_NAME__`` in activation scripts "
564
639
"(see :meth:`install_scripts`)."
565
640
msgstr ""
641
+ "``bin_name`` - 仮想環境の場所に相対的な、スクリプトのパス。アクティベートスク"
642
+ "リプトの中の ``__VENV_BIN_NAME__`` で使われます(:meth:`install_scripts` を参"
643
+ "照してください)。"
566
644
567
645
#: ../../library/venv.rst:249
568
646
msgid ""
569
647
"``env_exe`` - The name of the Python interpreter in the virtual environment. "
570
648
"Used for ``__VENV_PYTHON__`` in activation scripts (see :meth:"
571
649
"`install_scripts`)."
572
650
msgstr ""
651
+ "``env_exe`` - 仮想環境の中の Python インタプリタの名前。アクティベートスクリ"
652
+ "プトの中の ``__VENV_PYTHON__`` で使われます(:meth:`install_scripts` を参照し"
653
+ "てください)。"
573
654
574
655
#: ../../library/venv.rst:253
575
656
msgid ""
576
657
"``env_exec_cmd`` - The name of the Python interpreter, taking into account "
577
658
"filesystem redirections. This can be used to run Python in the virtual "
578
659
"environment."
579
660
msgstr ""
661
+ "``env_exec_cmd`` - ファイルシステムのリダイレクトを考慮に入れた、Python イン"
662
+ "タプリタの名前。これは仮想環境の中で Python を実行するのに使えます。"
580
663
581
664
#: ../../library/venv.rst:258
582
665
msgid ""
583
666
"The attribute ``lib_path`` was added to the context, and the context object "
584
667
"was documented."
585
668
msgstr ""
669
+ "コンテキストに ``lib_path`` 属性が追加され、コンテキストオブジェクトがドキュ"
670
+ "メントに追加されました。"
586
671
587
672
#: ../../library/venv.rst:262
588
673
msgid ""
589
674
"The *venv* :ref:`sysconfig installation scheme <installation_paths>` is used "
590
675
"to construct the paths of the created directories."
591
676
msgstr ""
677
+ "*venv* :ref:`システム構成インストールスキーム <installation_paths>` は作成さ"
678
+ "れたディレクトリのパスを構築するために使われます。"
592
679
593
680
#: ../../library/venv.rst:269
594
681
msgid "Creates the ``pyvenv.cfg`` configuration file in the environment."
@@ -619,6 +706,9 @@ msgid ""
619
706
"``setuptools``) in the environment. This is done by shelling out to the "
620
707
"``pip`` executable in the environment."
621
708
msgstr ""
709
+ "仮想環境の中の venv のコア依存関係パッケージ(現在は ``pip`` と "
710
+ "``setuptools``)をアップグレードします。これは仮想環境の中の ``pip`` 実行可能"
711
+ "ファイルによって行われます。"
622
712
623
713
#: ../../library/venv.rst:293
624
714
msgid ""
0 commit comments