This project has moved and is read-only. For the latest updates, please go here.

How to share pyproj across team with virtual environments with pytools 2.1?

Oct 24, 2014 at 9:57 AM

My team are working on a Python project using pytools as our development environment. We each have virtual environments. We would like to share the same .pyproj but we find that each of us has a different <InterpreterId> element when we have configured the virtual environment.

This wasn't so bad when the interpreter definition was in the <Interpreter> element in the .pyproj file. But in pytools 2.1, you only get an <InterpreterReference> element which appears to reference the completion db. We can't find where the interpreter is defined.

Could you let us know where the interpreter definitions are stored? I'm hoping that we could share them, and use a consistent GUID in the .pyproj file.

Murray Read
Oct 24, 2014 at 10:30 AM
I've made progress on this. The interpreter definitions are in the registry under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\PythonTools\Interpreters
Hopefully my team can set up common registry entries for this.
Oct 24, 2014 at 11:54 AM
It works!
We have all updated to the released pytools 2.1.
One of our team made a working virtual environment and set the project to use it.
Then they saved the registry settings for HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\PythonTools\Interpreters\<the environment guid> and
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\PythonTools\Options\Interactive Windows\<the environment guid>*
We applied those registry settings locally.
In Visual Studio, we each edited the environment options for this new environment to match our local setup.
Now our shared .pyproj file references a single InterpreterId guid, but we have individual settings for this InterpreterId.
(we just need to figure out how to automate project environment setup now)
Oct 24, 2014 at 2:06 PM
Glad you've figured it out. Unfortunately, the use of GUIDs was designed without considering source control, so it's a bit of a problem.

At one point I had a prototype for letting you specify any environment in a project file with <Interpreter> but it didn't make it into the product. I'll use your post as motivation to revisit that :)
Oct 24, 2014 at 2:08 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.