Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use interpreterPath instead pythonVenv #3828

Open
danielniccoli opened this issue Sep 6, 2023 · 3 comments
Open

Please use interpreterPath instead pythonVenv #3828

danielniccoli opened this issue Sep 6, 2023 · 3 comments
Milestone

Comments

@danielniccoli
Copy link

The extension should use the configured interpreter path python.interpreterPath instead of an addition custom variable azureFunctions.pythonVenv.

@alexweininger alexweininger added this to the 1.14.0 milestone Sep 28, 2023
@alexweininger
Copy link
Member

This sounds like a good suggestion. In my Python settings I see a python.venvPath setting? Did you mean to suggest that?

@danielniccoli
Copy link
Author

danielniccoli commented Oct 2, 2023

No, I mean python.interpreterPath. It is set anyway in the project and removes the need to configure yet another setting explicitly. It also reduces

"command": "${config:azureFunctions.pythonVenv}\\Scripts\\python -m pip install -r requirements.txt"

to

"command": "${command:python.interpreterPath} -m pip install -r requirements.txt"

@nturinski
Copy link
Member

I was investigating this one, and there's an annoying issue as to why this won't work for us.

It seems like if python.interpreterPath has a space in it, it won't actually run the python command for us.

You end up with something like this:

image

Works fine without a space though.

image

This might be a windows only issue for now. I'm trying to see if there's a way for me to get the interpreter in our runtime code so that we can convert it, but I think it'd be better if the Python team just wrapped their fs path with quotations.

I have an issue tracking it here: microsoft/vscode-python#23028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants