vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Document python.venvPath on the Python/Environments page

Open brettcannon opened this issue 8 years ago • 11 comments

https://code.visualstudio.com/docs/python/environments doesn't mention python.venvPath which people have bumped up against wanting previously.

(Plus that page overall probably could stand to be looked over with fresh eyes since I last made changes to it 😉 .)

brettcannon avatar Apr 18 '18 18:04 brettcannon

@brettcannon, it looks like venvPath just refers to a single virtual env, yes? That seems to be the point of the #1019 discussion.

kraigb avatar Apr 19 '18 16:04 kraigb

Yes, just a string:

https://github.com/Microsoft/vscode-python/blob/6ebf5ce9023f61667a80b9bfbc5c70c453236043/package.json#L1141-L1146

And while that discussion was the impetus to file this, we have had that setting come up as the solution to several other support issues so we just thought that surfacing it a bit more might help alleviate people filing tickets where that's the ultimate solution.

brettcannon avatar Apr 19 '18 16:04 brettcannon

Brett, I added mention of venvPath in two places on environments.md and clarified it in settings-reference.md as well (see the two commits above). I think those are the two places to surface it; let me know what you think.

kraigb avatar Apr 20 '18 18:04 kraigb

I'm a little worried about the phrasing of "A virtual environment located in the folder". Since the setting points to a folder that contains one or more virtual environments and not a virtual environment itself, my concern is someone will read that and go, "OK, so I just point that at my virtual environment folder", and not, "I point that at the folder that contains the folder that is my virtual environment". Does that make sense?

So .envs, for instance, could have env1, env2, etc., and each of those are virtual environments. So the setting should point to .envs and not e.g. .envs/env1. Since virtual environments themselves are directories I'm worried someone will mistake "located in the folder" as "the folder that is the virtual environment".

I do like where you put the clarifications, though, and the general settings wording!

brettcannon avatar Apr 20 '18 19:04 brettcannon

That's what I was asking about before, so was a little confused. I'll fix it.

kraigb avatar Apr 20 '18 19:04 kraigb

Ah, sorry about that. I thought you were asking if it was a string or an array.

brettcannon avatar Apr 20 '18 20:04 brettcannon

No problem...so it's just a string with a path to a folder that contains virtual environments in subfolders. I think I got it now.

kraigb avatar Apr 20 '18 21:04 kraigb

@kraigb yep, you got it! Basically some folks keep all of their virtual environments in a single location on their machine, so this setting lets them point to that directory (it's confusing because virtual environments are themselves folders).

brettcannon avatar Apr 23 '18 16:04 brettcannon

OK, try this commit: https://github.com/Microsoft/vscode-docs/commit/c56225634292e6df4a5ddba48f12d746a852ff14

kraigb avatar Apr 23 '18 20:04 kraigb

Great!

brettcannon avatar Apr 24 '18 16:04 brettcannon

Would love to see https://github.com/Microsoft/vscode-python/issues/1019 implemented. :)

corydorning avatar Jan 06 '20 18:01 corydorning