Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.

Change to activate virtualenv in getting_started #8

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 3 additions & 2 deletions getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ If you don't use conda (see above), create a virtual environment::
Depending on your platform, the Python 3 interpreter could be invoked by
``python`` instead. This is the case for conda on Windows for example.

Install ``aiohttp`` in the virtual environment::
Activate the virtual environment and install ``aiohttp`` inside:

./venv/bin/python -m pip install -U aiohttp
source venv/bin/activate
pip install -U aiohttp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, I'm not sure that it's useful to activate the venv.

I'm using more and more:

venv/bin/python -m pip install aiohttp

And it works well :-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it'd be good to mention that users can test their installation using:

$ venv/bin/python examples/hello_world.py
hello world

to make it clear that they have to use venv/bin/python instead of python or python3 to run the examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should choose one approach and use it everywhere in the documentation. I see three options:

$ venv/bin/python examples/hello_world.py
$ alias python=$(pwd)/venv/bin/python
$ python examples/hello_world.py
$ source venv/bin/activate
$ python examples/hello_world.py

What's do you prefer ?
I think sourcing the virtualenv is the cleanest approach.