-
Notifications
You must be signed in to change notification settings - Fork 79
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
docs: Document virtualenv for docs project #989
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only one thing and this will be good to merge.
There's some other changes i'd like on this page but of scope for PR can be done later.
``` | ||
!!! info "Using `virtualenv`" | ||
Starting with Python 3.11, the `pip` tool will fail to install dependencies and packages globally, instead it's recommended to use `virtualenv`. If you desire to install packages globally, you must use another tool, such as [`pipx`](https://github.com/pypa/pipx). We recommend using `virtualenv` because it's easier and the recommended way to work on Python projects. | ||
!!! danger "Activating `virtualenv`" | ||
It's important to note that `virtualenv` activation is not persisted. If you restart your terminal/command prompt and want to work on the documentation project again, you have to reactivate your `virutalenv` using the appropriate activation command that was shown earlier in this guide. | ||
- Install dependencies with this single line command: | ||
```title="Run In Terminal" | ||
pip install -r requirements.txt | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
!!! info "Using `virtualenv`" | |
Starting with Python 3.11, the `pip` tool will fail to install dependencies and packages globally, instead it's recommended to use `virtualenv`. If you desire to install packages globally, you must use another tool, such as [`pipx`](https://github.com/pypa/pipx). We recommend using `virtualenv` because it's easier and the recommended way to work on Python projects. | |
!!! danger "Activating `virtualenv`" | |
It's important to note that `virtualenv` activation is not persisted. If you restart your terminal/command prompt and want to work on the documentation project again, you have to reactivate your `virutalenv` using the appropriate activation command that was shown earlier in this guide. | |
- Install dependencies with this single line command: | |
```title="Run In Terminal" | |
pip install -r requirements.txt | |
``` | |
``` | |
- Install dependencies with this single line command: | |
```title="Run In Terminal" | |
pip install -r requirements.txt | |
``` | |
!!! info "Using `virtualenv`" | |
Starting with Python 3.11, the `pip` tool will fail to install dependencies and packages globally, instead it's recommended to use `virtualenv`. If you desire to install packages globally, you must use another tool, such as [`pipx`](https://github.com/pypa/pipx). We recommend using `virtualenv` because it's easier and the recommended way to work on Python projects. | |
!!! danger "Activating `virtualenv`" | |
It's important to note that `virtualenv` activation is not persisted. If you restart your terminal/command prompt and want to preview your work on the documentation project again, you have to reactivate your `virutalenv` using the appropriate activation command that was shown earlier in this guide. |
Ideally i'd like to move this step below the rest of the instructions and have the admonitions follow as "extra information" so the flow is neater when "reading".
Additionally, in the second admonition "Activiation virtual env" just a small change as spinning up the server isn't technically required when working on docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Valastiri pushed a commit to fix this. Just to confirm, should Create and activate a Python Virtual Environment
stay as it is right now?
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
Summary
The Development Environment document for the Documentation project suggests running
pip
to install the needed dependencies. However, starting with Python 3.11, it's not possible to run plainpip install
because it fails with the following error:with the recommendation to use
virtualenv
orpipx
. See this StackOverflow answer for more details about this change.To conform to this requirement, the Development Environment document has been extended to cover creating and activating
virtualenv
.Location
https://docs.flybywiresim.com/dev-corner/development-projects/documentation-project/documentation/#required-tools
Discord username (if different from GitHub): xmudrii