-
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
Upgrading package via pip does not remove old files from site-packages #5020
Comments
You're using |
Explaining in a bit more detail, |
It woud be great if pip would never overwrite an existing file when trying to install something: if the target file already exists, throw an error. And |
I expected replacing is there really no other method than removing this file manually? |
Not now you've used |
Once your install as been messed by the use of |
Replacing |
I have never used |
@mukundjalan: it would help if you provided the exact command used (included the packages being installed). |
It is an internal package within our organisation. Lets say named
The package contains Later we removed those files from few folders and created different files in some other folder and released |
I don't see how pip could bring back those old files unless they are present in the new package. You mention those files are not in the source archive, are you sure that's what is being used for installation (and not some other binary package, like a wheel)? |
Thanks @benoit-pierre. I checked the packages and found that |
Build it from a clean work tree? As in during a CI build for example. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
I build wheel from package which contains two files:
a.py
andb.py
and install it viapip install
Then I remove
a.py
file and build wheel once again. New wheel contains onlyb.py
file so everything is ok.When I run try to do update via pip file
a.py
is not removed fromsite-packages
. Even uninstalling package viapip uninstall
leavesa.py
file insite-packages
Is there a way to upgrade package and remove old-package files from
site-packages
?What I've run:
The text was updated successfully, but these errors were encountered: