I use pyrobuf (a protobuf package) in Python 3. In order to use a proto-pattern you run pyrobuf <filename> --install
which will compile the pattern and copy it to the site-packages
folder from where you can import it.
I'm trying to do this via a script (which is quite straight forward). However I ran into a problem when trying to run pyrobuf inside a virtual environment.
I have somethin like this:
cmd = ['activate', <envname>, '&&', 'pyrobuf', <filename>, '--install', '&&', 'deactivate']
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
When run this installs the proto-pattern to my main anaconda install not to the (supposedly active) environment.
I'm installing pyrobuf to each individual environment but that doens't seem to make a difference.
Any help on how to run a programm 'inside a conda environment' is greatly appreciated.