Spirit Pi configuration: virtualenv -- necessary?

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Spirit Pi configuration: virtualenv -- necessary?

Postby esba1ley » Sun Feb 11, 2018 1:35 am

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?
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm

Re: Spirit Pi configuration: virtualenv -- necessary?

Postby Bastian » Sun Feb 11, 2018 11:20 am

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.

Kevin
Posts: 181
Joined: Tue Jul 28, 2015 12:56 am

Re: Spirit Pi configuration: virtualenv -- necessary?

Postby Kevin » Sun Feb 11, 2018 6:39 pm

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.

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Spirit Pi configuration: virtualenv -- necessary?

Postby esba1ley » Sun Feb 11, 2018 8:56 pm

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...
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Spirit Pi configuration: virtualenv -- necessary?

Postby esba1ley » Sun Feb 11, 2018 9:01 pm

To quote Bastian:

Since it's not that easy to replace the micro-sd card of spirit...


Already done it. Twice. Once to start from scratch with a Raspbian stretch version from RasPi (dated 11-29-17) instead of jessie, and another time to fix something dumb I did in the /boot/ partition.

Tweezers are your friend, and a steady hand, and patience. It is do-able.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460


Who is online

Users browsing this forum: No registered users and 1 guest