-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Python virtual environment #3305
Conversation
@Fabien-B looks like a good idea because more and more people have python conflicts. However, in the current version it looks like you need quite some manual work to get things working. Can that be improved? It would also (temporary) make switching branches quite hard doesn't it? |
@dewagter I don't think a 2 step process that you only have to do once is "quite some manual work" 😃 . |
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.
Ideally, it would be added to the install.sh
script. And it would need some communication.
Something like this: a04674b ? |
Great! Thanks a lot! |
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.
Ideally the install-window can be opened several times.
I added a guard to prevent creating the venv from itself (which can't be done), and adding the source to the .bashrc. |
Rebased on master |
@dewagter If it's ok for you, I replaced |
OK for me. I would just like the script to adapt to the distribution. For me, a project should be installed with |
Can we merge this ? |
Yes |
The pprzlink ref should be fixed first. Otherwise I'm okay with this. |
* [python] setup venv and update pprzlink. * [supervision] open terminal in the venv if it exists. * clean setup.py * guard venv boostrap * [install] Use distro instead of lsb_release. --------- Co-authored-by: Fabien-B <[email protected]>
I propose to ease the use of a python virtual environment.
It will allow a much more clear python dependencies management.
I did not integrate it in the Makefile to allow testing it without risking breaking anything.
To use it, create en venv:
python3 setup.py
Then source
pprzEnv/bin/activate
.It can be done in your .bashrc:
source $PAPARAZZI_HOME/pprzEnv/bin/activate
What are you though on that PR ?