Q:

Using Putty and VNC

I have an RPi3B+ which I can connect to through either Putty or VNC, both work fine. I've installed virtualenv with pip install virtualenv virtualenvwrapper.
When I'm connected through Putty and I issue the command workon <envname> I can enter the virtual environment without issue, but when I do the same having opened up a terminal in VNC, I get bash: workon: command not found.
I've issued pip install virtualenv virtualenvwrapper on VNC, and it's definitely there, but still get command not found.
Also, python modules that I've imported while connected by VNC aren't available when connected by Putty.
Why the difference? Aren't they just two different ways to access the same machine?

A:

This can happen when you put the activation code for virtualenvwrapper in the wrong bash startup script.
~/.profile is not run on a non-login shell (like the terminal started in the GUI). It is run if you log in using SSH. To have it activated in both situations you can move the code over to ~/.bashrc
NB: the code you have to move looks something like this. This is what's in my .bashrc, but it will be slightly different on your system
export WORKON_HOME=$HOME/dev/virtenv
export PROJECT_HOME=$HOME/dev
source /usr/local/bin/virtualenvwrapper.sh

