Page 1 of 1
Spirit Pi configuration: virtualenv -- necessary?
Posted: Sun Feb 11, 2018 1:35 am
by esba1ley
Is virtualenv really necessary? It seems like a nice way to swap between python configurations between projects, but for an embedded system, it would seem like it's one less layer of abstraction/confusion for less savvy users. I've got my Spirit Rover configured without it... but I'm wondering why you chose to use virtualenv and drop into a default virtual config for python? Can't we just use the system-wide version for consistency and simplicity?
Re: Spirit Pi configuration: virtualenv -- necessary?
Posted: Sun Feb 11, 2018 11:20 am
by Bastian
Agree. Virtualenv & virtualwrapper handle package dependancies and keep your global site-packages tidy. But it's not needed for embedded systems.
I've build several robots with rpi's (computer vision, localization & planning) and arduino's (Uno/mega for sensors and actuators) and have never used virtualenv. Not even for openCV (which is very "version-sensitive"). If virtualenv is used, the startup script saves several bash-commands after every (re-)start of the pi (source, profile or workon)
Since it's not that easy to replace the micro-sd card of spirit, it might make sense to use a virtual environment when several packages are added.
Re: Spirit Pi configuration: virtualenv -- necessary?
Posted: Sun Feb 11, 2018 6:39 pm
by Kevin
The reason for the virtualenv is that the code I was using to connect a PS3 game controller via bluetooth only runs in virtualenv. I'm sure it could be used outside it, but not with the limited install experience I've had. Once I get that together we can re-evaluate whether it's really necessary.
Re: Spirit Pi configuration: virtualenv -- necessary?
Posted: Sun Feb 11, 2018 8:56 pm
by esba1ley
Any python module that *depends* on executing in virtualenv is dubious... I'm a bit leary of using that one.
What package is that? I'd love to take a look at it, I might be able to decouple the two...
Re: Spirit Pi configuration: virtualenv -- necessary?
Posted: Sun Feb 11, 2018 9:01 pm
by esba1ley