| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 69ce604 commit 266eb48
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,10 +39,10 @@ msgid "" | |||
| 39 | 39 | "bug has been fixed or the application may be written using an obsolete " | |
| 40 | 40 | "version of the library's interface." | |
| 41 | 41 | msgstr "" | |
| 42 | - "Python アプリケーションはよく標準ライブラリ以外のパッケージやモジュールを利用" | ||
| 43 | - "します。またアプリケーションがあるバグ修正を必要としていたり、過去のバージョ" | ||
| 44 | - "ンのインターフェイスに依存しているために、ライブラリの特定のバージョンを必要" | ||
| 45 | - "とすることもあります。" | ||
| 42 | + "Python アプリケーションは、標準ライブラリに含まれないパッケージやモジュールを" | ||
| 43 | + "よく使います。特定のバグの修正が必要だったり、古いバージョンのライブラリのイ" | ||
| 44 | + "ンターフェイスに依存していたりするため、ライブラリの特定のバージョンが必要に" | ||
| 45 | + "なることもあります。" | ||
| 46 | 46 | ||
| 47 | 47 | #: ../../tutorial/venv.rst:17 | |
| 48 | 48 | msgid "" | |
@@ -52,21 +52,21 @@ msgid "" | |||
| 52 | 52 | "are in conflict and installing either version 1.0 or 2.0 will leave one " | |
| 53 | 53 | "application unable to run." | |
| 54 | 54 | msgstr "" | |
| 55 | - "そのため、1つのインストールされたPythonが全てのアプリケーションの要求に対応す" | ||
| 56 | - "ることは不可能です。もしアプリケーションAがあるモジュールのバージョン 1.0 を" | ||
| 57 | - "要求していて、別のアプリケーションBが同じモジュールのバージョン 2.0 を要求し" | ||
| 58 | - "ている場合、2つの要求は衝突していて、1.0 と 2.0 のどちらかのバージョンをイン" | ||
| 59 | - "ストールしても片方のアプリケーションが動きません。" | ||
| 55 | + "このため、1つの Python 環境ですべてのアプリケーションの要求を満たせるとは限り" | ||
| 56 | + "ません。アプリケーション A があるモジュールのバージョン 1.0 を必要とし、アプ" | ||
| 57 | + "リケーション B がバージョン 2.0 を必要とする場合、両者の要求は衝突します。" | ||
| 58 | + "1.0 と 2.0 のどちらをインストールしても、片方のアプリケーションは動作しませ" | ||
| 59 | + "ん。" | ||
| 60 | 60 | ||
| 61 | 61 | #: ../../tutorial/venv.rst:23 | |
| 62 | 62 | msgid "" | |
| 63 | 63 | "The solution for this problem is to create a :term:`virtual environment`, a " | |
| 64 | 64 | "self-contained directory tree that contains a Python installation for a " | |
| 65 | 65 | "particular version of Python, plus a number of additional packages." | |
| 66 | 66 | msgstr "" | |
| 67 | - "この問題の解決策は :term:`仮想環境<virtual environment>` を作ることです。仮想" | ||
| 68 | - "環境とは、特定のバージョンの Python と幾つかの追加パッケージを含んだ Python " | ||
| 69 | - "インストールを構成するディレクトリです。" | ||
| 67 | + "この問題は :term:`仮想環境 <virtual environment>` を作ることで解決できます。" | ||
| 68 | + "仮想環境とは、特定のバージョンの Python といくつかの追加パッケージを含む自己" | ||
| 69 | + "完結したディレクトリ構造です。" | ||
| 70 | 70 | ||
| 71 | 71 | #: ../../tutorial/venv.rst:27 | |
| 72 | 72 | msgid "" | |
@@ -77,12 +77,11 @@ msgid "" | |||
| 77 | 77 | "application B requires a library be upgraded to version 3.0, this will not " | |
| 78 | 78 | "affect application A's environment." | |
| 79 | 79 | msgstr "" | |
| 80 | - "別のアプリケーションはそれぞれ別の仮想環境を使うことができます。先の例にあっ" | ||
| 81 | - "た要求の衝突を解決する場合、アプリケーションAが固有の仮想環境を持ってそこにラ" | ||
| 82 | - "イブラリのバージョン 1.0 をインストールし、アプリケーションBが持つ別の仮想環" | ||
| 83 | - "境にライブラリのバージョン 2.0 をインストールすることができます。そしてアプリ" | ||
| 84 | - "ケーションBがライブラリのバージョンを 3.0 に更新することを要求する場合も、ア" | ||
| 85 | - "プリケーションAに影響しません。" | ||
| 80 | + "アプリケーションごとに異なる仮想環境を使うことができます。先ほどの例では、ア" | ||
| 81 | + "プリケーション A 専用の仮想環境にバージョン 1.0 をインストールし、アプリケー" | ||
| 82 | + "ション B 用の仮想環境にバージョン 2.0 をインストールすれば要求の衝突を解決で" | ||
| 83 | + "きます。アプリケーション B のためにライブラリをバージョン 3.0 に更新する必要" | ||
| 84 | + "があっても、アプリケーション A の環境には影響しません。" | ||
| 86 | 85 | ||
| 87 | 86 | #: ../../tutorial/venv.rst:36 | |
| 88 | 87 | msgid "Creating Virtual Environments" | |
@@ -95,19 +94,19 @@ msgid "" | |||
| 95 | 94 | "was run (as reported by the :option:`--version` option). For instance, " | |
| 96 | 95 | "executing the command with ``python3.12`` will install version 3.12." | |
| 97 | 96 | msgstr "" | |
| 98 | - "仮想環境の作成・管理に使われるモジュールは、 :mod:`venv` と呼ばれます。 :mod:" | ||
| 99 | - "`venv` は、コマンドが実行された Python のバージョン (:option:`--version` オプ" | ||
| 100 | - "ションで表示される) をインストールします。例えば、 ``python3.12`` でコマンド" | ||
| 101 | - "を実行すると、バージョン 3.12 がインストールされます。" | ||
| 97 | + "仮想環境の作成と管理には :mod:`venv` モジュールを使います。:mod:`venv` はその" | ||
| 98 | + "コマンドを実行したバージョンの Python をインストールします。このバージョン" | ||
| 99 | + "は :option:`--version` オプションで確認できます。例えば ``python3.12`` でコマ" | ||
| 100 | + "ンドを実行すると、バージョン 3.12 がインストールされます。" | ||
| 102 | 101 | ||
| 103 | 102 | #: ../../tutorial/venv.rst:44 | |
| 104 | 103 | msgid "" | |
| 105 | 104 | "To create a virtual environment, decide upon a directory where you want to " | |
| 106 | 105 | "place it, and run the :mod:`venv` module as a script with the directory " | |
| 107 | 106 | "path::" | |
| 108 | 107 | msgstr "" | |
| 109 | - "仮想環境を作るには、仮想環境を置くディレクトリを決めて、 そのディレクトリのパ" | ||
| 110 | - "スを指定して、 :mod:`venv` をスクリプトとして実行します::" | ||
| 108 | + "仮想環境を作るには、配置先のディレクトリを決めます。そのパスを指定して :mod:" | ||
| 109 | + "`venv` モジュールをスクリプトとして実行してください::" | ||
| 111 | 110 | ||
| 112 | 111 | #: ../../tutorial/venv.rst:47 | |
| 113 | 112 | msgid "python -m venv tutorial-env" | |
@@ -119,8 +118,8 @@ msgid "" | |||
| 119 | 118 | "also create directories inside it containing a copy of the Python " | |
| 120 | 119 | "interpreter and various supporting files." | |
| 121 | 120 | msgstr "" | |
| 122 | - "これは ``tutorial-env`` ディレクトリがなければ作成して、その中に Python イン" | ||
| 123 | - "タプリタ、その他関連するファイルのコピーを含むサブディレクトリを作ります。" | ||
| 121 | + "``tutorial-env`` ディレクトリがなければ作成されます。その中にサブディレクトリ" | ||
| 122 | + "も作られ、Python インタープリタのコピーや各種の補助ファイルが配置されます。" | ||
| 124 | 123 | ||
| 125 | 124 | #: ../../tutorial/venv.rst:53 | |
| 126 | 125 | msgid "" | |
@@ -130,26 +129,26 @@ msgid "" | |||
| 130 | 129 | "prevents clashing with ``.env`` environment variable definition files that " | |
| 131 | 130 | "some tooling supports." | |
| 132 | 131 | msgstr "" | |
| 133 | - "仮想環境の一般的なディレクトリの場所は ``.venv`` です。この名前は、通常はシェ" | ||
| 134 | - "ルで隠されているため、ディレクトリが存在する理由を説明する名前を付けても、邪" | ||
| 135 | - "魔にはなりません。また、一部のツールでサポートされている ``.env`` 環境変数定" | ||
| 136 | - "義ファイルによるクラッシュも防止します。" | ||
| 132 | + "仮想環境のディレクトリには ``.venv`` という名前がよく使われます。この名前なら" | ||
| 133 | + "ディレクトリの用途が分かり、通常はシェルで非表示になるため邪魔になりません。" | ||
| 134 | + "また、一部のツールが使う環境変数定義ファイル ``.env`` との名前の衝突も避けら" | ||
| 135 | + "れます。" | ||
| 137 | 136 | ||
| 138 | 137 | #: ../../tutorial/venv.rst:59 | |
| 139 | 138 | msgid "Once you've created a virtual environment, you may activate it." | |
| 140 | - msgstr "仮想環境を作ったら、それを有効化する必要があります。" | ||
| 139 | + msgstr "仮想環境を作ったら、有効化することができます。" | ||
| 141 | 140 | ||
| 142 | 141 | #: ../../tutorial/venv.rst:61 | |
| 143 | 142 | msgid "On Windows, run::" | |
| 144 | - msgstr "Windows の場合::" | ||
| 143 | + msgstr "Windows では次を実行します::" | ||
| 145 | 144 | ||
| 146 | 145 | #: ../../tutorial/venv.rst:63 | |
| 147 | 146 | msgid "tutorial-env\\Scripts\\activate" | |
| 148 | 147 | msgstr "tutorial-env\\Scripts\\activate" | |
| 149 | 148 | ||
| 150 | 149 | #: ../../tutorial/venv.rst:65 | |
| 151 | 150 | msgid "On Unix or MacOS, run::" | |
| 152 | - msgstr "Unix や Mac OS の場合::" | ||
| 151 | + msgstr "Unix や macOS では次を実行します::" | ||
| 153 | 152 | ||
| 154 | 153 | #: ../../tutorial/venv.rst:67 | |
| 155 | 154 | msgid "source tutorial-env/bin/activate" | |
@@ -161,9 +160,9 @@ msgid "" | |||
| 161 | 160 | "or :program:`fish` shells, there are alternate ``activate.csh`` and " | |
| 162 | 161 | "``activate.fish`` scripts you should use instead.)" | |
| 163 | 162 | msgstr "" | |
| 164 | - "(このスクリプトは bash shell で書かれています。 :program:`csh` や :program:" | ||
| 165 | - "`fish` を利用している場合、代わりに利用できる ``activate.csh`` と ``activate." | ||
| 166 | - "fish`` スクリプトがあります。)" | ||
| 163 | + "(このスクリプトは bash シェル用です。:program:`csh` や :program:`fish` を使っ" | ||
| 164 | + "ている場合は、代わりに ``activate.csh`` や ``activate.fish`` スクリプトを使っ" | ||
| 165 | + "てください。)" | ||
| 167 | 166 | ||
| 168 | 167 | #: ../../tutorial/venv.rst:74 | |
| 169 | 168 | msgid "" | |
@@ -172,9 +171,9 @@ msgid "" | |||
| 172 | 171 | "running ``python`` will get you that particular version and installation of " | |
| 173 | 172 | "Python. For example:" | |
| 174 | 173 | msgstr "" | |
| 175 | - "仮想環境を有効化すると、シェルのプロンプトに利用中の仮想環境が表示されるよう" | ||
| 176 | - "になり、``python`` を実行するとその仮想環境の Python を実行するようになりま" | ||
| 177 | - "す::" | ||
| 174 | + "仮想環境を有効化すると、使用中の仮想環境がシェルのプロンプトに表示されます。" | ||
| 175 | + "また、``python`` を実行するとその仮想環境の Python が起動するように環境が変更" | ||
| 176 | + "されます。例えば次のようになります:" | ||
| 178 | 177 | ||
| 179 | 178 | #: ../../tutorial/venv.rst:79 | |
| 180 | 179 | msgid "" | |
@@ -206,6 +205,10 @@ msgid "" | |||
| 206 | 205 | "version the virtual environment is using. The best practice is to ``unset " | |
| 207 | 206 | "PYTHONPATH`` in bash or the equivalent for the shell you are using." | |
| 208 | 207 | msgstr "" | |
| 208 | + "仮想環境を有効化しても ``PYTHONPATH`` 変数は一切変更されないことに注意してく" | ||
| 209 | + "ださい。仮想環境の Python バージョンと互換性のないコードへのパスが含まれてい" | ||
| 210 | + "ると、予期しない結果になることがあります。bash では ``unset PYTHONPATH`` を実" | ||
| 211 | + "行し、ほかのシェルでも同等の操作で設定を解除することをお勧めします。" | ||
| 209 | 212 | ||
| 210 | 213 | #: ../../tutorial/venv.rst:96 | |
| 211 | 214 | msgid "To deactivate a virtual environment, type::" | |
@@ -230,28 +233,27 @@ msgid "" | |||
| 230 | 233 | "Package Index <https://pypi.org>`_. You can browse the Python Package Index " | |
| 231 | 234 | "by going to it in your web browser." | |
| 232 | 235 | msgstr "" | |
| 233 | - " :program:`pip` と呼ばれるプログラムでパッケージをインストール、アップグレー" | ||
| 234 | - "ド、削除することができます。デフォルトでは ``pip`` は `Python Package Index " | ||
| 235 | - "<https://pypi.org>`_ からパッケージをインストールします。ブラウザを使って " | ||
| 236 | - "Python Package Index を閲覧することができます。" | ||
| 236 | + ":program:`pip` というプログラムを使って、パッケージのインストール、アップグ" | ||
| 237 | + "レード、削除ができます。デフォルトでは ``pip`` は `Python Package Index " | ||
| 238 | + "<https://pypi.org>`_ からパッケージをインストールします。Python Package " | ||
| 239 | + "Index はウェブブラウザで閲覧できます。" | ||
| 237 | 240 | ||
| 238 | 241 | #: ../../tutorial/venv.rst:110 | |
| 239 | 242 | msgid "" | |
| 240 | 243 | "``pip`` has a number of subcommands: \"install\", \"uninstall\", \"freeze\", " | |
| 241 | 244 | "etc. (Consult the :ref:`installing-index` guide for complete documentation " | |
| 242 | 245 | "for ``pip``.)" | |
| 243 | 246 | msgstr "" | |
| 244 | - "``pip`` は \"install\" 、 \"uninstall\" 、 \"freeze\" など、いくつかのサブコ" | ||
| 245 | - "マンドを持っています。 (``pip`` の完全なドキュメントは :ref:`installing-" | ||
| 246 | - "index` ガイドを参照してください。)" | ||
| 247 | + "``pip`` には \"install\"、\"uninstall\"、\"freeze\" などのサブコマンドがあり" | ||
| 248 | + "ます。(``pip`` の詳しいドキュメントについては :ref:`installing-index` ガイド" | ||
| 249 | + "を参照してください。)" | ||
| 247 | 250 | ||
| 248 | 251 | #: ../../tutorial/venv.rst:114 | |
| 249 | 252 | msgid "" | |
| 250 | 253 | "You can install the latest version of a package by specifying a package's " | |
| 251 | 254 | "name:" | |
| 252 | 255 | msgstr "" | |
| 253 | - "パッケージ名を指定してそのパッケージの最新版をインストールすることができま" | ||
| 254 | - "す::" | ||
| 256 | + "パッケージ名を指定すると、そのパッケージの最新版をインストールできます:" | ||
| 255 | 257 | ||
| 256 | 258 | #: ../../tutorial/venv.rst:116 | |
| 257 | 259 | msgid "" | |
@@ -274,8 +276,8 @@ msgid "" | |||
| 274 | 276 | "You can also install a specific version of a package by giving the package " | |
| 275 | 277 | "name followed by ``==`` and the version number:" | |
| 276 | 278 | msgstr "" | |
| 277 | - "パッケージ名のあとに ``==`` とバージョン番号を付けることで、特定のバージョン" | ||
| 278 | - "のパッケージをインストールすることもできます::" | ||
| 279 | + "パッケージ名の後に ``==`` とバージョン番号を付けると、特定のバージョンをイン" | ||
| 280 | + "ストールすることもできます:" | ||
| 279 | 281 | ||
| 280 | 282 | #: ../../tutorial/venv.rst:128 | |
| 281 | 283 | msgid "" | |
@@ -298,10 +300,10 @@ msgid "" | |||
| 298 | 300 | "number to get that version, or you can run ``python -m pip install --" | |
| 299 | 301 | "upgrade`` to upgrade the package to the latest version:" | |
| 300 | 302 | msgstr "" | |
| 301 | - "同じコマンドを再び実行した場合、``pip`` は要求されたバージョンがインストール" | ||
| 302 | - "済みだと表示して何もしません。別のバージョン番号を指定すればそのバージョンを" | ||
| 303 | - "インストールしますし、``python -m pip install --upgrade`` を実行すればその" | ||
| 304 | - "パッケージを最新版に更新します::" | ||
| 303 | + "このコマンドを再実行しても、``pip`` は指定されたバージョンがインストール済み" | ||
| 304 | + "であることを確認して何もしません。別のバージョン番号を指定すれば、そのバー" | ||
| 305 | + "ジョンをインストールできます。また、``python -m pip install --upgrade`` を実" | ||
| 306 | + "行すればパッケージを最新版に更新できます:" | ||
| 305 | 307 | ||
| 306 | 308 | #: ../../tutorial/venv.rst:141 | |
| 307 | 309 | msgid "" | |
@@ -326,13 +328,13 @@ msgid "" | |||
| 326 | 328 | "``python -m pip uninstall`` followed by one or more package names will " | |
| 327 | 329 | "remove the packages from the virtual environment." | |
| 328 | 330 | msgstr "" | |
| 329 | - "``python -m pip uninstall`` コマンドに削除するパッケージ名を1つ以上指定しま" | ||
| 330 | - "す。" | ||
| 331 | + "``python -m pip uninstall`` の後に1つ以上のパッケージ名を指定すると、それらの" | ||
| 332 | + "パッケージが仮想環境から削除されます。" | ||
| 331 | 333 | ||
| 332 | 334 | #: ../../tutorial/venv.rst:154 | |
| 333 | 335 | msgid "" | |
| 334 | 336 | "``python -m pip show`` will display information about a particular package:" | |
| 335 | - msgstr "``python -m pip show`` は指定されたパッケージの情報を表示します::" | ||
| 337 | + msgstr "``python -m pip show`` は指定したパッケージの情報を表示します:" | ||
| 336 | 338 | ||
| 337 | 339 | #: ../../tutorial/venv.rst:156 | |
| 338 | 340 | msgid "" | |
@@ -367,8 +369,8 @@ msgid "" | |||
| 367 | 369 | "``python -m pip list`` will display all of the packages installed in the " | |
| 368 | 370 | "virtual environment:" | |
| 369 | 371 | msgstr "" | |
| 370 | - "``python -m pip list`` は仮想環境にインストールされた全てのパッケージを表示し" | ||
| 371 | - "ます::" | ||
| 372 | + "``python -m pip list`` は仮想環境にインストールされているすべてのパッケージを" | ||
| 373 | + "表示します:" | ||
| 372 | 374 | ||
| 373 | 375 | #: ../../tutorial/venv.rst:174 | |
| 374 | 376 | msgid "" | |
@@ -393,9 +395,9 @@ msgid "" | |||
| 393 | 395 | "expects. A common convention is to put this list in a ``requirements.txt`` " | |
| 394 | 396 | "file:" | |
| 395 | 397 | msgstr "" | |
| 396 | - "``python -m pip freeze`` はインストールされたパッケージ一覧を、``python -m " | ||
| 397 | - "pip install`` が解釈するフォーマットで生成します。一般的な慣習として、このリ" | ||
| 398 | - "ストを ``requirements.txt`` というファイルに保存します:" | ||
| 398 | + "``python -m pip freeze`` もインストール済みのパッケージ一覧を出力しますが、こ" | ||
| 399 | + "ちらは ``python -m pip install`` が受け付ける形式を使います。この一覧は通常、" | ||
| 400 | + "``requirements.txt`` というファイルに保存します:" | ||
| 399 | 401 | ||
| 400 | 402 | #: ../../tutorial/venv.rst:187 | |
| 401 | 403 | msgid "" | |
@@ -417,9 +419,9 @@ msgid "" | |||
| 417 | 419 | "shipped as part of an application. Users can then install all the necessary " | |
| 418 | 420 | "packages with ``install -r``:" | |
| 419 | 421 | msgstr "" | |
| 420 | - "``requirements.txt`` をバージョン管理システムにコミットして、アプリケーション" | ||
| 421 | - "の一部として配布することができます。ユーザーは必要なパッケージを ``install -" | ||
| 422 | - "r`` でインストールできます::" | ||
| 422 | + "``requirements.txt`` はバージョン管理システムにコミットし、アプリケーションの" | ||
| 423 | + "一部として配布できます。ユーザーは ``install -r`` で必要なパッケージをすべて" | ||
| 424 | + "インストールできます:" | ||
| 423 | 425 | ||
| 424 | 426 | #: ../../tutorial/venv.rst:199 | |
| 425 | 427 | msgid "" | |
@@ -452,7 +454,7 @@ msgid "" | |||
| 452 | 454 | "want to make it available on the Python Package Index, consult the `Python " | |
| 453 | 455 | "packaging user guide`_." | |
| 454 | 456 | msgstr "" | |
| 455 | - "``pip`` にはたくさんのオプションがあります。 ``pip`` の完全なドキュメントは :" | ||
| 456 | - "ref:`installing-index` を参照してください。パッケージを作成してそれを Python " | ||
| 457 | - "Package Index で公開したい場合、 `Python packaging user guide`_ を参照してく" | ||
| 458 | - "ださい。" | ||
| 457 | + "``pip`` にはほかにも多くのオプションがあります。``pip`` の詳しいドキュメント" | ||
| 458 | + "については :ref:`installing-index` ガイドを参照してください。作成したパッケー" | ||
| 459 | + "ジを Python Package Index で公開するには、`Python packaging user guide`_ を参" | ||
| 460 | + "照してください。" | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments