44
mkvirtualenv [options] ENVNAME
44
mkvirtualenv [-a project_path] [-i package] [-r requirements_file] [virtualenv options] ENVNAME
47
All command line options are passed directly to ``virtualenv``. The
48
new environment is automatically activated after being initialized.
47
All command line options except ``-a``, ``-i``, ``-r``, and ``-h`` are passed
48
directly to ``virtualenv``. The new environment is automatically
49
activated after being initialized.
50
全てのコマンドラインオプションは ``virtualenv`` へ直接渡されます。新しい仮想環境は初期化された後に自動的にアクティブ化されます。
51
``-a``, ``-i``, ``-r``, ``-h`` を除いた全てのコマンドラインオプションは ``virtualenv`` へ直接的に渡されます。新しい仮想環境は初期化された後に自動的にアクティブ化されます。
67
The ``-a`` option can be used to associate an existing project
68
directory with the new environment.
70
``-a`` オプションは、既存のプロジェクトディレクトリに新しい環境を関連付けるのに使います。
73
The ``-i`` option can be used to install one or more packages (by
74
repeating the option) after the environment is created.
76
``-i`` オプションは、その環境を作成した後に指定したパッケージをインストールできます (このオプションを繰り返し使うことで複数のパッケージもインストールできます) 。
79
The ``-r`` option can be used to specify a text file listing packages
80
to be installed. The argument value is passed to ``pip -r`` to be
83
``-r`` オプションは、インストールしたいパッケージ一覧を保存したテキストファイルを指定するのに使います。この引数のファイル名は ``pip -r`` へ渡されてインストールが行われます。
67
87
* :ref:`scripts-premkvirtualenv`
68
88
* :ref:`scripts-postmkvirtualenv`
89
* `requirements ファイルのフォーマット`_
91
.. _requirements file format: http://www.pip-installer.org/en/latest/requirement-format.html
92
.. _requirements ファイルのフォーマット: http://www.pip-installer.org/en/latest/requirements.html#the-requirements-file-format
100
Create a new virtualenv in the ``WORKON_HOME`` directory.
102
``WORKON_HOME`` ディレクトリに新しい環境を作成します。
109
mktmpenv [VIRTUALENV_OPTIONS]
112
A unique virtualenv name is generated.
114
一意な名前をもつ virtualenv 環境が生成されます。
119
Using real prefix '/Library/Frameworks/Python.framework/Versions/2.7'
120
New python executable in 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/bin/python
121
Overwriting 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/lib/python2.7/distutils/__init__.py
123
Installing distribute...............................................
124
....................................................................
125
.................................................................done.
126
This is a temporary environment. It will be deleted when deactivated.
127
(1e513ac6-616e-4d56-9aa5-9d0a3b305e20) $
70
129
.. _command-lsvirtualenv:
503
564
*Based on a contribution from James Bennett and Jannis Leidel.*
505
566
*James Bennett と Jannis Leidel から提供されたものに基づいています。*
568
.. _command-toggleglobalsitepackages:
570
toggleglobalsitepackages
571
------------------------
574
Controls whether the active virtualenv will access the packages in the
575
global Python ``site-packages`` directory.
577
アクティブな virtualenv が、グローバルの Python ``site-packages`` ディレクトリにあるパッケージにアクセスさせるかどうかを制御します。
584
toggleglobalsitepackages [-q]
587
Outputs the new state of the virtualenv. Use the ``-q`` switch to turn off all
590
実行すると virtualenv の更新後の状態を表示します。非表示にするには ``-q`` を指定してください。
595
New python executable in env1/bin/python
596
Installing distribute.............................................
597
..................................................................
598
..................................................................
600
(env1)$ toggleglobalsitepackages
601
Disabled global site-packages
602
(env1)$ toggleglobalsitepackages
603
Enabled global site-packages
604
(env1)$ toggleglobalsitepackages -q
608
============================
609
Project Directory Management
610
============================
612
==============================
614
==============================
618
:ref:`project-management`
620
.. _command-mkproject:
626
Create a new virtualenv in the WORKON_HOME and project directory in
629
PROJECT_HOME にプロジェクトディレクトリと WORKON_HOME に新しい virtualenv を作成します。
636
mkproject [-t template] [virtualenv_options] ENVNAME
639
The template option may be repeated to have several templates used to
640
create a new project. The templates are applied in the order named on
641
the command line. All other options are passed to ``mkvirtualenv`` to
642
create a virtual environment with the same name as the project.
644
テンプレートオプションは、新しいプロジェクトを作成するのに使うテンプレートを複数指定できます。テンプレートはコマンドラインで指定した順番で適用されます。その他の全てのオプションは、プロジェクトと同じ名前をもつ仮想環境を作成するために ``mkvirtualenv`` に渡されます。
649
New python executable in myproj/bin/python
650
Installing distribute.............................................
651
..................................................................
652
..................................................................
654
Creating /Users/dhellmann/Devel/myproj
656
/Users/dhellmann/Devel/myproj
657
(myproj)$ echo $VIRTUAL_ENV
658
/Users/dhellmann/Envs/myproj
663
* :ref:`scripts-premkproject`
664
* :ref:`scripts-postmkproject`
666
.. _command-setvirtualenvproject:
672
Bind an existing virtualenv to an existing project.
674
既存の virtualenv を既存のプロジェクトに束縛します。
681
setvirtualenvproject [virtualenv_path project_path]
684
The arguments to ``setvirtualenvproject`` are the full paths to the
685
virtualenv and project directory. An association is made so that when
686
``workon`` activates the virtualenv the project is also activated.
688
``setvirtualenvproject`` への引数は、virtualenv とプロジェクトディレクトリへのフルパスです。仮想環境のアクティブ化を ``workon`` で行うときに、そのプロジェクトもアクティブ化されるように連携します。
693
New python executable in myproj/bin/python
694
Installing distribute.............................................
695
..................................................................
696
..................................................................
698
Creating /Users/dhellmann/Devel/myproj
699
(myproj)$ mkvirtualenv myproj_new_libs
700
New python executable in myproj/bin/python
701
Installing distribute.............................................
702
..................................................................
703
..................................................................
705
Creating /Users/dhellmann/Devel/myproj
706
(myproj_new_libs)$ setvirtualenvproject $VIRTUAL_ENV $(pwd)
709
When no arguments are given, the current virtualenv and current
710
directory are assumed.
712
引数を指定しない場合は、カレントの virtualenv とカレントディレクトリが指定されたと見なします。
715
Any number of virtualenvs can refer to the same project directory,
716
making it easy to switch between versions of Python or other
717
dependencies for testing.
719
任意の数の virtualenv が、Python またはその他のテスト向けの依存関係をもったバージョン間で切り替えやすいように、同じプロジェクトディレクトリを参照できます。
721
.. _command-cdproject:
727
Change the current working directory to the one specified as the
728
project directory for the active virtualenv.
730
カレントのワークディレクトリから、アクティブな virtualenv のプロジェクトディレクトリとして指定したディレクトリに変更します。