Spirit Pi configuration: virtualenv -- necessary?

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
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
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

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: 180
Joined: Tue Jul 28, 2015 12:56 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

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

----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 26 guests