2

I've got a project damastes, which introduced two packages, damastes and procrustes:

>>> import damastes
>>> import procrustes

I removed the procrustes package from the project, without changing the damastes project version, rebuilt and reinstalled the project:

$ poetry build
$ pip install dist/damastes... --user -I

but

>>> import procrustes

is still very much alive. It won't show on $ pip list, and why should it? It's part of the damastes package.

Here is the ghost:

$ locate procrustes
/home/user/.local/lib/python3.9/site-packages/procrustes
/home/user/.local/lib/python3.9/site-packages/procrustes/__init__.py
/home/user/.local/lib/python3.9/site-packages/procrustes/__pycache__
/home/user/.local/lib/python3.9/site-packages/procrustes/procrustes.py
/home/user/.local/lib/python3.9/site-packages/procrustes/run.py

Is there a legitimate way to pinpoint and clean it up? Or do I have to remove the procrustes directory manually?

3
  • pip uninstall procrustes does not do the trick? Commented Sep 20, 2021 at 7:52
  • Of course not. There has never been $ pip install procrustes in the first place. Commented Sep 20, 2021 at 8:30
  • It does not matter there was not an explicit pip install procrustes, packages can install their dependencies indirectly Commented Sep 20, 2021 at 9:01

1 Answer 1

1

The procrustes.egg-info folder is not available in the site-packages folder. That's why pip can't detect it. Remove it manually. Or install it via pip install and then pip uninstall works.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks! But all this is a bit uncomfortable. What am I supposed to do to escape such cases in the future?
There is no guaranteed solution. Try to install project requirements from PyPI. Some build files might cause such problems.
I saw your other questions about this project, I think you'd better integrate all the needed functions of all files into one python file if you have enough knowledge and skills.
At least, in one package, yes :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.