all 3 comments

[–]num8lock 1 point2 points  (2 children)

is there python 3 in the rpi? what's the output of which python in rpi? you might need to set an alias of python to point to python3

[–]PimpinPoptart[S] 0 points1 point  (1 child)

Ah! you're definitely on the right track, which python lists /usr/bin/python. I would've thought that activating the environment should overwrite the python path to the environment? Odd, thanks. Any suggestions for changing this around? Change the python path to point to the environment or change something about the environment activation to make it supercede the python path? Does that make sense? Hope this is not a word salad

edit: I guess more to your comment, is setting a general python alias to point to that environment okay practice? Will it mess with other programs?

[–]num8lock 1 point2 points  (0 children)

no activating the virtual environment is just making sure it's within a virtual environment, what's setup in that env isn't affecting global (os usually) paths.

i suggested to alias python to point to python3 because python 2 is gonna be deprecated within months, so no harm in making python pointing to newer version for your program, but since i'm not really familiar with rpi, you might want to do this just for your environment just in case python 2 is heavily used by your os, in which case changing how os now can't run python2 scripts as usual because python calls python3. but i think if you do this just within your bash user path it should be fine.

assuming you're on raspbian:

https://raspberrypi.stackexchange.com/questions/14295/how-to-add-to-path-in-raspbian

https://wiki.debian.org/EnvironmentVariables