robotpy / robotpy-wpilib

Moved to https://github.com/robotpy/mostrobotpy
https://robotpy.github.io
Other
169 stars 59 forks source link

Run robot code in a virtualenv on the roboRIO? #75

Closed virtuald closed 9 years ago

virtuald commented 9 years ago

I'd like to discuss the pros/cons of this with anyone interested.

When the robotpy installer installs packages, it could install them into a virtualenv. The primary advantage I see is if we wanted to support a 'clean' command, it could just rm -rf the virtualenv and then the user would be back to new.

Whatever script that runs robot code could source the virtualenv first, then run robot.py. However, this might make it difficult for someone to run their robot.py manually via SSH, if they didn't know that they had to run the virtualenv first.

Another problem would be if a user tried to manually install packages via pip3 without installing them in the virtualenv, I've seen odd problems when the package exists in both the virtualenv and the global environment.

computer-whisperer commented 9 years ago

I like the idea as an option, but perhaps not as default behavior. I think an acceptable route might be an option to "specify interpreter" and leave creation of the virtualenv and run setup to the end user.

virtuald commented 9 years ago

Yeah, the more I think about this the worse of an idea it is.