-
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
Installing packages fails when already cached on Windows (making 1.1.9+ unusable on Windows) #4535
Comments
I believe this is the same issue #4479 |
The basic issue seems to be the same, but #4479 is about about the pre-release version 1.2.0a1 from the beginning of august. Now the latest stable release 1.1.9 (september 18th) is affected which is supposed to be run on productive systems and makes it pretty much unusable on windows (at least in the conditions we are using it). This information is missing in #4479 IMHO. |
Could this be related to the |
That I don't know. |
The workaround works. It seems that 1.1.8 is not compatible with core 1.0.5, but if you pip install==1.1.8, it comes with peotry core 1.0.5. |
Workaround works at 1.1.8 |
I have a similar problem when poetry tries to install colorama
Windows 10 19043.1237 |
I am having the same issue on github’s CI Windows machine. |
Tested with 1.1.10, same problem. A pull request that seems to fix this issue: #4531 |
The work around worked for me, but I had to install poetry-core manually (poetry-core==1.0.4) |
Uninstalling poetry, removing all poetry folders and files, then reinstalling, also worked for the initial The workaround resolved the issue across the board for me as well. |
Still borked with 1.1.11 on windows, anything from the Cache fails. So stable poetry is pretty stuffed on Windows atm |
If any of you have some free time, can you help me run these tests on Windows without the fix applied, and with the fix applied? |
@rubendibattista I don't think so, that issue seems to be due to some other reason, not Paths starting with slashes. |
I'm surprised this is allowed to go on for over a month. This makes poetry 100% unusable on windows. In fact, even downgrading doesn't help if you're on the newest version of python because there's a fix for that in poetry 1.1.10. |
I have this issue and need to constantly delete my ~\AppData\Local\pypoetry\Cache\artifacts folder to fix the issue when updating dependencies. Any update on whether or not a release will come soon that will have a patch for this issue? (using 1.1.11) |
For those with this issue, the following fix worked for me:
@property
def path(self): # type: () -> str
res = urlparse.urlsplit(self.url)
if res.scheme == 'file':
netloc = res.netloc
if netloc:
netloc = '\\\\' + netloc
return urllib.request.url2pathname(netloc + res.path)
else:
return urlparse.unquote(res.path) This seems quite a bit simpler than the "fix" PR? |
I still see exactly this issue with Poetry 1.2.0a2. Is this expected? |
@pohlt Wait a while for the next release. In the meantime, you can install the 1.2 branch with:
|
This gives me an error
Removing the
|
@neersighted @serverwentdown Seems that the PR has been merged. When can we expect a new release? |
1.1.12 is released with this fix |
Same problem exists with Poetry==1.3.2 and poetry-core==1.4.0 installed inside conda env. Windows 11 (and 10), Python=3.9.7 (Github Actions, Miniconda)
any suggestions? |
That is a completely different issue as evidenced by the stack trace; can you please open a new issue with reproduction instructions (e.g. a pyproject.toml tested to reliably reproduce + version information)? |
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
Installing a package that is already in the local pypoetry cache on windows fails since poetry 1.1.9.
The problem does not occur, if the package is not cached.
Python version used is 3.6.8
Workaround
As a workaround we downgraded to 1.1.8 and poetry-core 1.0.4.
IMHO
It seems like this issue comes from the commit 8238cab
The call to "archive.path" in line 615 of 'poetry/installation/executor.py' seems to remove only two of the three slashes for Windows file URLs (file:///c:/.....). This results in an invalid path with a leading slash (visible in the command output
File \C:\Users\user\AppData
), which in the end leads to a missing file exception.The text was updated successfully, but these errors were encountered: