Skip to content
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

Fix venv command examples #2560

Merged
merged 2 commits into from
Jul 18, 2018
Merged

Fix venv command examples #2560

merged 2 commits into from
Jul 18, 2018

Conversation

x-ji
Copy link
Contributor

@x-ji x-ji commented Jul 17, 2018

Description

The documentation refers to venv, which is native to Python3. However, the command examples are as if they were still using virtualenv, which is a package independent of venv:

  • venv doesn't need to be installed via pip. In fact pip install venv would
    return an error.
  • The correct way to invoke venv is python3 -m venv, not venv, which would
    return command not found.

See https://docs.python.org/3/library/venv.html

I suspect that at some point the documentation simply replaced all occurrences of virtualenv with
venv. However they are different modules and are used differently. The documentation should either stick with virtualenv or correctly use venv, which is what this PR tries to do.

Types of change

Change to the documentation.

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

(I'm not sure what "or if they do, I've added all required information." refers to. I have documented why I feel it necessary to change the relevant commands in the documentation.)

The documentation refers to `venv`, which is native to Python3.
However, the command examples are as if they were still `virtualenv`,
which is a package independent of `venv`:

- It doesn't need to be installed via `pip`. In fact `pip install venv` would
return an error.
- The correct way to invoke `venv` is `python3 -m venv`, not `venv`, which would
return command not found.

See https://docs.python.org/3/library/venv.html

I suspect the documentation simply replaced all occurrences of `virtualenv` with
`venv`. However they are different modules and are used differently.
@explosion-bot
Copy link
Collaborator

Hi @x-ji, thanks for your pull request! 👍 It looks like you haven't filled in the spaCy Contributor Agreement (SCA) yet. The agrement ensures that we can use your contribution across the project. Once you've filled in the template, put it in the .github/contributors directory and add it to this pull request. If your pull request targets a branch that's not master, for example develop, make sure to submit the Contributor Agreement to the master branch. Thanks a lot!

If you've already included the Contributor Agreement in your pull request above, you can ignore this message.

@x-ji
Copy link
Contributor Author

x-ji commented Jul 17, 2018

@ines ines added the docs Documentation and website label Jul 18, 2018
@ines
Copy link
Member

ines commented Jul 18, 2018

Thanks a lot, really appreciate the attention to detail! I'm pretty sure that's what happened and we just didn't adjust the commands correctly. In general, we definitely want to standardise on Python 3, but provide fallbacks for Python 2-specific stuff for users who are still working on older code bases.

Eh I think I put it in here already?

Yes, that's all good! 👍 Sorry, our bot isn't very clever. It's currently only checking the existing repo and not the files included in the PR, because that ended up being tricky to get right. (I might look into this again, though!)

@ines ines merged commit 19a5ef1 into explosion:master Jul 18, 2018
grivaz pushed a commit to grivaz/spaCy that referenced this pull request Jul 18, 2018
* Fix venv command examples

The documentation refers to `venv`, which is native to Python3.
However, the command examples are as if they were still `virtualenv`,
which is a package independent of `venv`:

- It doesn't need to be installed via `pip`. In fact `pip install venv` would
return an error.
- The correct way to invoke `venv` is `python3 -m venv`, not `venv`, which would
return command not found.

See https://docs.python.org/3/library/venv.html

I suspect the documentation simply replaced all occurrences of `virtualenv` with
`venv`. However they are different modules and are used differently.

* Update comment [ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation and website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants