DeepRank / iScore

iScore: an MPI supported software for ranking protein-protein docking models based on a random walk graph kernel and support vector machines
Apache License 2.0
27 stars 11 forks source link

how to uninstall iscore #8

Closed LilySnow closed 5 years ago

LilySnow commented 5 years ago

I installed iscore in one location. Then I deleted it and wanted to install it in another location. But I got the following error message when running pip install -e ./:

(base) [lixue@alcazar iScore]$ pip install -e ./ Obtaining file:///home/lixue/tools/iScore Requirement already satisfied: numpy>=1.13 in /home/lixue/tools/anaconda3/lib/python3.6/site-packages (from iScore==0.0) (1.16.2) Requirement already satisfied: scipy in /home/lixue/tools/anaconda3/lib/python3.6/site-packages (from iScore==0.0) (1.2.1) Installing collected packages: iScore Found existing installation: iScore 0.0 Exception: Traceback (most recent call last): File "/home/lixue/tools/anaconda3/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 179, in main status = self.run(options, args) File "/home/lixue/tools/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 393, in run use_user_site=options.use_user_site, File "/home/lixue/tools/anaconda3/lib/python3.6/site-packages/pip/_internal/req/init.py", line 50, in install_given_reqs auto_confirm=True File "/home/lixue/tools/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 816, in uninstall uninstalled_pathset = UninstallPathSet.from_dist(dist) File "/home/lixue/tools/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 505, in from_dist '(at %s)' % (link_pointer, dist.project_name, dist.location) AssertionError: Egg-link /data/lixue/capri/Capri47/T160/test_iscore/iScore does not match installed location of iScore (at /home/lixue/tools/iScore)

LilySnow commented 5 years ago

Ok, found the egg-link file. Problem solved.

LilySnow commented 5 years ago

One more question: Shall we automatically remove the egg-link file when running pip install -e ./

NicoRenaud commented 5 years ago

the egg should be removed automatically with with pip uninstall no ?

LilySnow commented 5 years ago

req_uninstall.py planned to do it but failed (see line501-505) when iscore tries to be installed in a new location other than the previous location.

This is caused by the egg-link file from the previous installation. For example, /home/lixue/tools/anaconda3/lib/python3.6/site-packages/iScore.egg-link has a content that points to the previous location: /data/lixue/capri/Capri47/T160/test_iscore/iScore. If we try to install iscore to a new location (e.g., /home/lixue/tools/iScore, it will give the error message:

AssertionError: Egg-link /data/lixue/capri/Capri47/T160/test_iscore/iScore does not match installed location of iScore (at /home/lixue/tools/iScore)

LilySnow commented 5 years ago

Sorry, my bad. No problems any more. As long as a user does not manually delete the previous folder, it should be fine.