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

poetry env use on Windows needs to deal with spaces in path or take a command line list #1747

Closed
2 of 3 tasks
madig opened this issue Dec 16, 2019 · 1 comment · Fixed by #1774
Closed
2 of 3 tasks
Labels
kind/bug Something isn't working as expected

Comments

@madig
Copy link

madig commented Dec 16, 2019

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10 1909 x64
  • Poetry version: 1.0.0
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

On Windows, Python is typically installed into C:\Program Files, i.e. C:\Program Files\Python38\python.exe. Attempting to make poetry use it rather than the Python it is installed for results in:

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

[EnvCommandError]
Command C:\Program Files\Python38\python.exe -c "import sys; print('.'.join([str(s) for s in sys.version_info[:3]]))" errored with the following return 
code 1, and output:

In this case, the path must be treated as ["C:\\Program Files\\Python38\\python.exe"].

Python for Windows also comes with the py program for selecting which installed Python gets called. You can call it like py and it will start the latest Python, or like py -2.7-32 to start that other thing. In that case, the string must be interpreted as ["py", "-2.7-32"]

@madig madig added the kind/bug Something isn't working as expected label Dec 16, 2019
Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant