Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Select virtual env from selected Python #8

Open
tomaxsas opened this issue Jul 22, 2021 · 4 comments
Open

Select virtual env from selected Python #8

tomaxsas opened this issue Jul 22, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tomaxsas
Copy link

Problem

Currently manually need enter virtual env activation script

Solution

Take activation script from python or use selected python env.

Alternatives

No response

Additional context

No response

@tomaxsas tomaxsas added the enhancement New feature or request label Jul 22, 2021
@tomaciazek
Copy link
Owner

I'll see what are the options of integrating with the Python (base) extension, but at a glance, I can't find a way to get that value (it is now stored in the internal storage of the extension).

@tomaxsas
Copy link
Author

Built in terminal sources venv when selected so worth look at it

@tomaciazek
Copy link
Owner

Built in terminal sources venv when selected so worth look at it

Ah, that's a good lead - there might be a clue somewhere there.

@tomaciazek
Copy link
Owner

I've looked into this, and it's not going to be easy to implement:

  • the python.pythonPath setting (the source of truth up till now) is getting deprecated
  • I can't interact with another plugin from the perspective of language server so I will need to implement a Middleware to ensure that python.pythonPath is exposed as a virtual setting (something like here)
  • on top of that, it will add a dependency on the Python plugin

And I'm also considering that some projects will have multiple different Python virtual environments for various Python scripts, and only a single venv for Ansible, so distinguishing this by having a separate setting makes sense in such case; ability to choose between these sources of Python interpreter path should be implemented.

All in all, I might implement this in the future (depending on the demand from the community), but currently this is not a priority.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants