Skip to content

Added windows virtual environment activation command. Closes #942 #946

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 6 commits into from
Dec 20, 2018
Merged

Added windows virtual environment activation command. Closes #942 #946

merged 6 commits into from
Dec 20, 2018

Conversation

suryasr007
Copy link
Contributor

Issue: 942

  • Add windows virtual environment activation command.

Additional Changes

  • Defined venv as name of virtual environment, Instead of my_project.
  • Provided details about python's virtual environment module venv

@mpoulin
Copy link
Contributor

mpoulin commented Dec 17, 2018

@suryasr007
Thanks for making these edits.
Is there a benefit to naming the environment "venv" instead of "my_project"?

@suryasr007
Copy link
Contributor Author

Hi @mpoulin,

As I mentioned in guide, 'venv' is the general convention used globally. As it is readily available in ignore files (eg: .gitignore').

Copy link
Contributor

@apjanke apjanke left a comment

Choose a reason for hiding this comment

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

A couple minor typo/style notes.

placed in the ``my_project`` folder, isolated from the global Python installation.
placed in the ``venv`` folder, isolated from the global Python installation.

For windows, same command which is mentioned in step 1 can be used for creation of virtual environment. But, to activate, we use the following command.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Windows" should be capitalized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing out. I will change it.


For windows, same command which is mentioned in step 1 can be used for creation of virtual environment. But, to activate, we use the following command.

Assuming that, you are in project directory:
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: no comma necessary here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing out. I will change it.

@@ -284,6 +295,9 @@ 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
where they were placed.

.. note::
Python has included virtual environment module from 3.3. It works in the simliar way as mentioned above. For details: `venv <https://docs.python.org/3/library/venv.html>`_.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "similar".

Should probably also be "...included the virtual...".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you please elaborate this?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is just an English grammar issue, I think. For a non-proper noun "foo", if you say "X has included foo", it really needs an article like "X has include a foo" or "X has included the foo". Plain "X has included foo" only works for proper nouns/names of the form "X has included Foo" For that form, it would be "Python has included venv from 3.3.". That would be okay since "venv" is a proper noun since it's the actual name of the module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @apjanke for the clarification.

@suryasr007
Copy link
Contributor Author

HI @apjanke
Fixed the typos

@apjanke
Copy link
Contributor

apjanke commented Dec 18, 2018

Looks good to me now.

@suryasr007
Copy link
Contributor Author

on windows I thinkthis should be venv\Scripts\activate

Yeah, sorry my bad. I will rectify that.
Thanks for pointing out.

@mpoulin mpoulin merged commit 9d975b5 into realpython:master Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants