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.

Allow user to set their own custom activation commands for the interpreter

See original GitHub issue

Upon creating a terminal, an activation command to activate the current environment is sent to the terminal.

There are often issues like https://github.com/microsoft/vscode-python/issues/8770, where environment is not activated due to extension sending the wrong activation commands.

Example: An activation command used to work with conda x.x.x, but conda y.y.y changed something so it is no longer valid. And if the extension does not keep up with the change, activating the environment would fail.

Allow user to set their own activation commands for the interpreter they’re using. Often they know the correct activation commands as you can notice in https://github.com/microsoft/vscode-python/issues/8770.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:39
  • Comments:10

github_iconTop GitHub Comments

3reactions
Khazbscommented, Nov 28, 2021

Came here from #9917. There are a lot of things VSCode doesn’t do right, and activating a Python virtual environment by source-ing the activate script instead of using workon is definitely one of them. The postactivate script is just ignored. Bummer! I really hope this feature would allow us to workon our virtual environments.

3reactions
GuillaumeDesforgescommented, Dec 17, 2020

+1 Same for me with #14794, it would even allow to use Nix shell

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings Reference for Python - Visual Studio Code
Indicates whether to automatically activate the environment you select using the Python: Select Interpreter command when a new terminal is created. For example, ......
Read more >
Activating Anaconda Environment in VsCode - Stack Overflow
Simply use. shift + cmd + P; Search Select Interpreter. pyhton : Select Interpreter. Select it and it will show you the list...
Read more >
venv — Creation of virtual environments — Python 3.11.1 ...
A virtual environment is created on top of an existing Python ... required to enable the Activate.ps1 script by setting the execution policy...
Read more >
Configure a virtual environment | PyCharm Documentation
Select Add Local Interpreter. In the left-hand pane of the Add Python Interpreter dialog, select Virtualenv Environment. Creating a virtual ...
Read more >
User Guide — virtualenv 16.7.11 documentation
In a newly created virtualenv there will also be a activate shell script. For Windows systems, activation scripts are provided for the ...
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