thunder-project/thunder

Upgrade via pip fails

kenburke opened this issue · 4 comments

Hi all,

Simple question, hope I can get some guidance. I installed thunder a while back, version 0.4.1. I've tried to update it but have had no luck. The normal command:
sudo pip install --upgrade thunder-python
... runs successfully (as far as I can tell), however when I check out td.__version__ I still see 0.4.1 and the td object does not have the expected attributes (like images). This persists even if I uninstall and reinstall thunder.

One other comment (unsure of relevance) is that the install command yields the following warning:

The directory '/Users/ken/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/ken/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

(though I still have the same results even when using the -H flag)

Any thoughts?

I'd recommend doing a pip uninstall thunder-python followed by a pip install thunder-python, I've found that upgrade can exhibit weird behavior in the past.

Another thing to check, if the advice from @freeman-lab doesn't do it: using sudo for the pip install can do strange things if the root user is using a different installation of Python than than your regular user.

@jwittenbach : Your suggestion led me down the right path. When I attempted to follow the suggestion from @freeman-lab I realized I needed to use sudo because otherwise I was denied permission to /Library/Python/2.7/site-packages/thunder/__init__.py.

I tried a number of other things but the only way to fully, once-and-for-all remove the old version of Thunder was to literally rm -rf the thunder-related folders in /Library/Python/2.7/site-packages/. Then doing a full uninstall/reinstall using pip without sudo got me to version 1.4.2 for my regular user without the stuff for the root user interfering.

Lesson learned, don't mess with sudo ;-)

Thanks!

@kenburke glad that helped! I've run into the same thing, and it can be a bit of a headache :)