0

Does anybody have documentation on how to set up the Canopy Python environment as an interpreter within Visual Studio? I am new to VS and Canopy so I apologize if this seems trivial. I have read the following sites but still struggling to get Canopy integrated as the interpreter. Currently Python 64bit 2.7 is the only interpreter that shows up.

Install https://pytools.codeplex.com/wikipage?title=PTVS%20Installation Environments http://pytools.codeplex.com/wikipage?title=Python%20Environments

Pavel Minaev
  • 99,783
  • 25
  • 219
  • 289

1 Answers1

3

Python Tools for Visual Studio (PTVS) will typically automatically detect Canopy and show it as "Python 2.7 64-bit". You can check to see if it is detecting Canopy by selecting 'Environment Options' in PTVS. The path in 'Path' by default will be something like ...\AppData\User\Enthought\Canopy\User... If this is what it is finding, you should be set.

If the Python interpreter PTVS is finding is not Canopy, then it sounds like you have another version of Python installed. This is ok and there are two options.

If you want it to find Canopy automatically, you need to be running Canopy 1.1 or later and make it your default Python environment. To update Canopy if needed, go to Help -> Software Updates. Then to make it your default Python environment, Edit -> Preferences and click the button to make it your default. This has the effect of changing some Python-standard registry keys.

If you don't want Canopy to mess with your environment, that's completely fine, too. You can get the same effect by clicking 'Add environment' in the PTVS environment options dialog. The settings for a default Canopy install are: Path: C:\Users\\AppData\Local\Enthought\Canopy\User\python.exe Windows path: C:\Users\\AppData\Local\Enthought\Canopy\User\pythonw.exe Lib: C:\Program Files\Enthought\Canopy\App\appdata\canopy-1.1.0.1371.win-x86_64\Lib

Note that the first two point to the 'User' environment whereas the last points into the core install.

The upcoming Canopy 1.2 release in a couple of weeks will include more complete integration with PTVS and Visual Studio that will automate this and remove the need for Canopy to be the default Python environment.

  • Thank you!!! This was extremely helpful. First as I installed and uninstalled several Python interpreters, I did not realize the version still installed was Canopy (since there was no reference to it)...(e.g. Python 2.7 64-bit)...so this resolved a lot of frustration. Also appreciate the additional info on the customization as this allowed me to understand how to use 3.x, etc. Lastly, it was nice to see that if all alse failed 1.2 is on it's way. Thank you again!!!! – user2916706 Oct 25 '13 at 14:52