python-shell icon indicating copy to clipboard operation
python-shell copied to clipboard

Support pyenv-win

Open acelinkio opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. Support for pyenv-win. pyenv-win is pyenv for Windows.

Describe the solution you'd like Add PYENV environmental variable to Python search path.

Describe alternatives you've considered Use child_process.exec directly to call commands.

Additional context Adding this logic to the library would be an immense help with encouraging a better Windows developer experience.

acelinkio avatar Dec 04 '22 05:12 acelinkio

Example of how the python vscode extension handles supporting pyenv and pyenv-win.

https://github.com/microsoft/vscode-python/blob/3698950c97982f31bb9dbfc19c4cd8308acda284/src/client/pythonEnvironments/discovery/locators/services/pyenvLocator.ts#L19-L34

acelinkio avatar Dec 04 '22 05:12 acelinkio

Even after setting the python path, was still getting issues. These are likely related to the shims added? Not entirely clear. https://github.com/pyenv-win/pyenv-win/issues/352

2022-12-03 21:37:26.898 [error] Error: spawn C:UsersAcelink.pyenvpyenv-winshims ENOENT
	at Process.onexit (node:internal/child_process:283:19)
	at onErrorNT (node:internal/child_process:478:16)
	at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

vscode-python does not encounter this issue with shims, not entirely sure how.

acelinkio avatar Dec 04 '22 05:12 acelinkio

@acelinkit to support exe files we have created a new PR https://github.com/pyenv-win/pyenv-win/pull/463 have a look and let us know does this resolve the issue.

kirankotari avatar Dec 06 '22 16:12 kirankotari

I do not currently have a way to test. Appreciate your investigation but going to close due to inactivity on my side.

acelinkio avatar Jul 15 '23 17:07 acelinkio

Hello, Can this issue be re-opened? I have the same issue, and could test.

supertick avatar Jul 14 '24 22:07 supertick