Mac Visual Studio Conda Packages For Windows

Posted on  by 

The Python shipped from is compiled with Visual Studio 2008 for versions before 3.3, Visual Studio 2010 for 3.3 and 3.4, and Visual Studio 2015 for 3.5 and 3.6. Python extensions are recommended to be compiled with the same compiler. Microsoft Visual Studio is a rich, integrated development environment for creating stunning applications for Windows, Android, and iOS, among others. Read More A platform-as-a-service (PaaS) that enables developers to create and deploy cloud apps.

Active1 year, 10 months ago

I'm using vscode in Windows 10 as my code editor, and want to make an easy way to launch it with the correct conda env to allow debugging.

Currently I am having to open a command prompt, then activate the conda env, then paste the shortcut to vscode into the prompt to execute. Like so:

I have tried creating a batch file to wrap these calls, but unfortunately once I call 'source activate' to start the conda env, the batch commands after this are not executed as it is considered another instance.

Any tips? Other than writing a vscode extension to handle this (which I'm seriously tempted to do, but it's such a simple problem...)

gcasey
gcaseygcasey

2 Answers

You might want to run source activate env-name as a task in visual studio. https://code.visualstudio.com/Docs/editor/tasks

tasks.json

SteffenSteffen
1,9371 gold badge17 silver badges25 bronze badges

The best option I found is to set the python.venvPath parameter in vscode settings to your anaconda envs folder.

Mac Visual Studio Conda Packages For Windows

Then if you bring up the command palette (ctl + shift + P on windows/linux, cmd + shift + P on mac) and type Python: Select Workspace Interpreter all your envs will show up and you can select which env to use.

The python extension will also need to be installed for the Select Workspace Interpreter option.

Note: The Select Workspace Interpreter takes around 10 seconds to come up on my computer using the current version of VSCode. My answer was originally posted here.

alexbhandarialexbhandari

Visual Studio For Mac Vs Windows

Not the answer you're looking for? Browse other questions tagged anacondavisual-studio-codecondaminiconda or ask your own question.

Coments are closed