-
Notifications
You must be signed in to change notification settings - Fork 75
virtual environment on Debian 12 #851
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
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for that! Adjust to what makes sense and I can get that in.
@@ -12,6 +12,9 @@ InvenioRDM is set up with a command line management tool, `invenio-cli`, which i | |||
pip install invenio-cli | |||
``` | |||
|
|||
!!! warning "Create a virtual environment" | |||
When installing on Debian 12 with Python 3.11, one has to create the virtual environment first with the `venv` module. For example: ```python -m venv venv --prompt invenioDRM.``` |
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.
Slight modification to emphasize PEP 668 as the root reason here.
When installing on Debian 12 with Python 3.11, one has to create the virtual environment first with the `venv` module. For example: ```python -m venv venv --prompt invenioDRM.``` | |
When installing on an environment adhering to [PEP 668](https://peps.python.org/pep-0668/), e.g., Debian 12 with Python 3.11, one has to create the virtual environment first. For example, with the `venv` module: `python -m venv .venv --prompt invenioDRM`. |
It must be said too that invenio-cli
is not necessarily meant to be installed in the same virtualenv as the application. It's an independent tool that can be used to create other instances on the same machine for instance. This is why pip install -U
or pipx
or (probably will be the recommended default in next version of InvenioRDM like @carlinmack mentioned) uv tool install invenio-cli
are good avenues. But Python environments are tricky so a generic pip install was the default recommendation.
I wonder if we want to recommend Longer term switching to uv as the recommendation probably will make the most sense. |
Yeah, I can see us adding a line to that note: "or
|
Hmm, maybe I created more confusion than I intended. I think that people installing InvenioRDM have a good technical level, and they will be able to figure out what to do. Considering that the future is 'uv,' then we probably should not waste time with 'pip.' If you agree I will cancel/remove this pull request. Sorry for the noise. |
No worries. If you've encountered it, others certainly have. I will leave this open until tomorrow, to see if anyone has a stronger desire for one avenue or the other. If not, I may apply my and Tom's comments if I have time, else I will close this. |
❤️ Thank you for your contribution!
Description
When installing InvenioDRM on Debian 12, the command to install the command line tool fails because the virtual environment is missing. The error message is:
To fix this issue, manually create a virtual environment first:
After creating and activating the virtual environment, the installation completes successfully.
This PR adds a note to the documentation to help other users encountering this common issue on Debian 12 and other systems with PEP 668 enforcement.
Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:
master
branch.production
branch following approval or indicate to a maintainer that it should be backported.Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that: