Create environment using venv or conda#19848
Conversation
389156c to
303d763
Compare
8fa2d0d to
7e38079
Compare
| ); | ||
| } | ||
|
|
||
| export namespace CreateEnv { |
|
|
||
| def get_venv_path(name: str) -> str: | ||
| if sys.platform == "win32": | ||
| return os.fspath(CWD / name / "Scripts" / "python.exe") |
There was a problem hiding this comment.
Any documentation for this assumption?
There was a problem hiding this comment.
This is the same assumption we have in the extension. The docs here describe the "Scripts" or "bin" : https://docs.python.org/3/library/venv.html#creating-virtual-environments
There was a problem hiding this comment.
Gotcha.
Maybe still add a one line comment linking the doc? I'm asking because it looks like we actually don't use that assumption in discovery and identification:
and this is the first time.
There was a problem hiding this comment.
The purpose of the code here and in the discovery is different. In discovery we are tyring to find the .cfg file. in the create env, we created the env, so we know what type it is and where the python.exe will be. I can add the docs nonetheless.
There was a problem hiding this comment.
Yes, I think the comment is misleading:
// envFolder
// |__ pyvenv.cfg <--- check if this file exists
// |__ python <--- interpreterPathIt seems to indicate python binary can be directly under the env folder.
src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts
Show resolved
Hide resolved
src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts
Show resolved
Hide resolved
src/client/pythonEnvironments/creation/provider/condaCreationProvider.ts
Show resolved
Hide resolved
karrtikr
left a comment
There was a problem hiding this comment.
Thanks for addressing, LGTM. I still think we could do the hyperlink to log channel #19848 (review) given it so nicely shows the command progress, otherwise looks good.
I will definitely add that in an update. |

Closes #19676
Closes #19850