-
Notifications
You must be signed in to change notification settings - Fork 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
AssertionError: Egg-link <package> does not match .. when using symbolic links #9452
Comments
Actually, it would be probably better to utilize the
The paths are
Therefore, possible fix is to use
or even
as the |
Just to comment, this bug does not only affect uninstalling, but also when trying to reinstall any package that has been installed in editable state. For example, having a package with import setuptools
setuptools.setup(
name="mypackage",
version="1.0.0",
packages=[
"mypackage",
],
) And then installing it twice with Example output
Notes
|
Was there any forward progress on fixing this issue? I have also run into this as part of a larger installer script that I cannot easily modify to skip the offending packages. |
This is already fixed. |
@uranusjr Yea, I actually can't duplicate this anymore after removing an old Ahhh well, this still might be useful for others to know: If you run into trouble w/ a recent |
Searching https://pip.pypa.io/en/stable/news/# for 9452 finds nothing and the only PR linked here (#9453) was closed as bitrotten. |
It’s #10697, I think we failed to recognise (or just forgot) fixing the junction link use case also fixes symbolic links. |
Environment
Description
Install a package in editable state using a path that contains a symbolic link. After that, you can not uninstall the package. This seems to be very much like #6900 (especially: #6900 (comment)). Could be related to #8598.
Expected behavior
Should be able to install, uninstall, reinstall packages to any folder, even if the file path has symbolic links.
How to Reproduce
1) Create project
C:\tmp\a_long_long_filepath
Files:
2) Create symbolic link
This creates symbolic link
D:\foo
that points toC:\tmp\a_long_long_filepath
3) Install the package in editable state
4) Check pip list
5) Try to uninstall
Upgrade pip to 20.3.3 and try again -> identical results (with line number changes).
Proposed fix
As we are interested knowing if the file (folder) is the same, compare the target of the symbolic link to the folder:
In
_internal\req\req_uninstall.py
, instead ofuse
In my case,
After the proposed fix:
and there is no entry for
mypackage
inpip list
.The text was updated successfully, but these errors were encountered: