python-poetry / python-poetry/install.python-poetry.org
"FileNotFoundError" exception raised on Windows
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 255
- Forks
- 65
- Avg merge
- 2h 48m
- Merged PRs (30d)
- 1
Description
Hello,
Trying the installer on Windows (for a user that does not have administrator rights) and the installation fails:
C:\Users\foo-bar>rez-env python -- python C:\Users\foo-bar\Downloads\install-poetry.py
Retrieving Poetry metadata
# Welcome to Poetry!
This will download and install the latest version of Poetry,
a dependency and package manager for Python.
It will add the `poetry` command to Poetry's bin directory, located at:
C:\Users\foo-bar\AppData\Roaming\Python\Scripts
You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.
Installing Poetry (1.3.2)
Installing Poetry (1.3.2): Creating environment
Installing Poetry (1.3.2): Installing Poetry
Installing Poetry (1.3.2): Creating script
Installing Poetry (1.3.2): Done
Traceback (most recent call last):
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 940, in <module>
sys.exit(main())
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 919, in main
return installer.run()
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 557, in run
self.display_post_message(version)
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 686, in display_post_message
return self.display_post_message_windows(version)
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 694, in display_post_message_windows
path = self.get_windows_path_var()
File "C:\Users\foo-bar\Downloads\install-poetry.py", line 718, in get_windows_path_var
path, _ = winreg.QueryValueEx(key, "PATH")
FileNotFoundError: [WinError 2] The system cannot find the file specified
Cheers,
Thomas
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in install-poetry.py at get_windows_path_var, called by display_post_message_windows, and reproduce the installer on Windows without administrator rights. Investigate the reported FileNotFoundError from winreg.QueryValueEx; done means the installation completes and the post-install message is displayed without this exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100