Monday, October 10, 2016

python setup.py install/develop does not reinstall everything

Leave a Comment

I have come across one very mysterious situations that has struggled me for quite long. Let's make thing simple in this way:

I have a python package, including these 3 files(I only mentioned those related here):

folder1/setup.py folder1/scripts/csce.py folder1/bregman/ceset.py 

folder1/scripts/csce.py contains a line:

from bregman.casm import CASMSet 

I have a few versions of such package with different modificaion of my own. OK, in my Mac in folder1, I previously python setup.py develop one version, after I copy such package to folder2 and modify both folder2/scripts/csce.py and folder2/bregman/ceset.py . Then I python setup.py develop again, everything works great.

However, previously I also setup folder1/setup.py in my cluster. After I copy my code folder2 to my cluster and peform python setup develop, it seems in my PATH/bin/csce.py, it refers to folder2/scripts/csce.py, this is nice and good. However, the bregman function it calls refers to the previously installed folder1/bregman/ceset.py . I have to go to the site-packages folder and remove something like breggman.egg . and perform python setup develop in folder 2 to make everything work again... Does anyone know why do i need to remove that bregman.egg in order to python setup.py develop the latest code? Thank you.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment