question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to start python extension automatically in a workspace?

See original GitHub issue

Hello! I love vscode, and the python extension especially. The new vscode remote extension makes the story even better.

I do find one thing to occassionally be a bit of a minor inconvenience, however:

It doesn’t seem like the python extension starts up in a vscode workspace until I do one of a few things – (open a .py file, run a python - * command in the Ctrl+Shift+P command pallete, etc). This means that if I open up a terminal window before I’ve done one of those things, my virtual environment for that workspace won’t be activated.

I would love to be able to specify in a workspace that I want the python extension to automatically boot up with the workspace. I asked @DonJayamanne about this in person early today (by the way, it was really awesome to meet you!) and he recommended I submit an issue.

I think he described creating a minimal extension that requires the python extension, but I’m still not sure how to go about that.

Thanks, and sorry for the wall of text!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, May 17, 2019

@zdog234 Apologies for the delay, the source and the release of the VSIX can be found here https://github.com/DonJayamanne/vscode-activate-python-extension/releases/tag/0.0.1

  • Please download the VSIX from the release page.
  • Go into VSCode, select the command Extensions: Instal from VSIX
  • Select the above VSIX and that’s it

The Python extension will automatically load everytime.

Note: If you don’t want the python extension to load everytime in some places, then:

  • Just disable this extension in the specific workspaces (this is possible in VSC),
  • Just go into the extension and disable for current workspace.
1reaction
DonJayamannecommented, May 15, 2019

Reopening to provide a simple extension sample that’ll auto activate the extension for you, (as promised at PyCon, will provide sample instructions to build it your self)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Python environments in VS Code
To do so, open the Command Palette (Ctrl+Shift+P) and enter Preferences: Open User Settings. Then set python.defaultInterpreterPath , which is in the Python...
Read more >
Getting started with VS Code for Python: Setting up a ...
To do that, first Open a Folder ( CTRL+K CTRL+O ) and then go to File > Preferences > Settings > Workspace to...
Read more >
how to configure my project to automatically activate Python ...
To activate Python extension in VSCode I must open a Python file. Can I activate it without opening a Python file?
Read more >
Setting Up VSCode For Python Programming - YouTube
In this video I will show you how to setup VSCode to write Python code with some helpful extensions that include features like...
Read more >
Simplified Project Setup for Python in Visual Studio Code
"A new Create Environment command has been added that automatically creates a virtual environment or Conda environment for your Python workspace ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found