Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update virtualenvs.rst #799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions 24 docs/dev/virtualenvs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ Basic Usage
.. code-block:: console

$ cd my_project_folder
$ virtualenv venv
$ virtualenv my_project

``virtualenv venv`` will create a folder in the current directory which will
``virtualenv my_project`` will create a folder in the current directory which will
contain the Python executable files, and a copy of the ``pip`` library which you
can use to install other packages. The name of the virtual environment (in this
case, it was ``venv``) can be anything; omitting the name will place the files
case, it was ``my_project``) can be anything; omitting the name will place the files
in the current directory instead.

This creates a copy of Python in whichever directory you ran the command in,
placing it in a folder named :file:`venv`.
placing it in a folder named :file:`my_project`.

You can also use the Python interpreter of your choice (like
``python2.7``).

.. code-block:: console

$ virtualenv -p /usr/bin/python2.7 venv
$ virtualenv -p /usr/bin/python2.7 my_project

or change the interpreter globally with an env variable in ``~/.bashrc``:

Expand All @@ -60,12 +60,12 @@ or change the interpreter globally with an env variable in ``~/.bashrc``:

.. code-block:: console

$ source venv/bin/activate
$ source my_project/bin/activate

The name of the current virtual environment will now appear on the left of
the prompt (e.g. ``(venv)Your-Computer:your_project UserName$)`` to let you know
the prompt (e.g. ``(my_project)Your-Computer:your_project UserName$)`` to let you know
that it's active. From now on, any package that you install using pip will be
placed in the ``venv`` folder, isolated from the global Python installation.
placed in the ``my_project`` folder, isolated from the global Python installation.

Install packages as usual, for example:

Expand All @@ -84,7 +84,7 @@ This puts you back to the system's default Python interpreter with all its
installed libraries.

To delete a virtual environment, just delete its folder. (In this case,
it would be ``rm -rf venv``.)
it would be ``rm -rf my_project``.)

After a while, though, you might end up with a lot of virtual environments
littered across your system, and its possible you'll forget their names or
Expand Down Expand Up @@ -158,15 +158,15 @@ Basic Usage

.. code-block:: console

$ mkvirtualenv venv
$ mkvirtualenv my_project

This creates the :file:`venv` folder inside :file:`~/Envs`.
This creates the :file:`my_project` folder inside :file:`~/Envs`.

2. Work on a virtual environment:

.. code-block:: console

$ workon venv
$ workon my_project

Alternatively, you can make a project, which creates the virtual environment,
and also a project directory inside ``$PROJECT_HOME``, which is ``cd`` -ed into
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.