-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 on Windows fails with File does not exists error #4479
Comments
As of today I have the exact same problem. (Havent updated any package in a while, so might have been there earlier). So far I've tried:
I am on the latest version of |
The cause of the issue is in executor.py and core/packages/utils/link.py.
This issue only surfaces when using the cached local packages. |
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use the utility function url_to_path.
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use the utility function url_to_path.
I am experiencing this exact issue on Poetry 1.1.10. I am using pyenv to manage my python versions, currently using the most recent available, 3.9.7. Not sure how to proceed other than to use pip for now and remake dependencies once this has been solved. Thank you for your PR! Hopefully it will be done shortly. |
For anyone who ran into this and bricked their installation, here's how to fix it:
You can locate your cache folder by calling |
Unfortunately the fix was temporary on my end. Still running into this regularly and have to wipe the cache each time. |
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use the utility function url_to_path.
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use the utility function url_to_path.
Closes #4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use `Link` and `url_to_path`.
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use `Link` and `url_to_path`.
For me this problem happens, when i tried to install package that was already installed and placed in Manually deleting folder |
When will there be a fix for this? |
@dibog Wait a while for the next release. In the meantime, you can install the branch with:
|
python-poetry/poetry#4479 (comment) affects poetry 1.1.9, 1.1.10 and 1.1.11, will be fixed in 1.1.12
Closes python-poetry#4479 The previous implementation would fail to install packages on Windows because it creates a `Path` starting with a slash. Such a `Path` is invalid on Windows. Instead, use `Link` and `url_to_path`.
Is this also available in the preview version (1.2.x) yet? I want to keep using that version, but I really need this patch. |
@lululukas You can adjust the command accordingly, replace |
Failed with You have to remove the Thanks for the patch! |
I experienced something similar on Windows 11 trying to install Sphinx. The problem was fixed by enabling long path lengths. My error
|
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. |
-vvv
option).Issue
When trying to
poetry add
a dependency or dopoetry install
orpoetry update
, the command fails with an error saying that the file does not exist. The file refers to the weel of any dependencies that need to be installed. However, the file actually does exist at the correct location, but is somehow not found by poetry. I think this is due to a leading\
in the path. I haven't looked at the code, but I use bash bundled with git-for-windows in Windows Terminal. I assume that has something to do with the problem.This is the error message, you can see the leading backslash in the path which I think is the culprit:
However, the file does exist:
Edit:
I get the same error using powershell, so it seems like the issue is not related to using bash.
The text was updated successfully, but these errors were encountered: