ipython-notebook icon indicating copy to clipboard operation
ipython-notebook copied to clipboard

How to upgrade Python packages

Open sahuguet opened this issue 11 years ago • 5 comments

for instance, the pre-installed scikit-learn is 0.14. How can install 0.15? I have 0.15 installed on my system (OSX), but the notebook only picks 0.14.

sahuguet avatar Dec 02 '14 18:12 sahuguet

You can try to add your custom location to the PYTHONPATH setting in the app's preferences, but it's possible that that won't work properly.

I will need to update the package but unfortunately I don't have much time to work on it right now.

liyanage avatar Dec 02 '14 18:12 liyanage

I already tried. I have 0.15 installed globally. And it is not recognized by the notebook. I have tried to mess up with sys.path. Didn't work either.

Since notebook is launching virtualenv, is there anything I can do there? I tried to pip install -U inside virtualenv. Maybe I just need to link 0.15.

sahuguet avatar Dec 02 '14 18:12 sahuguet

Renaming sklearn inside IPython-Notebook.app/Contents/Resources/virtualenv/lib/python2.7/site-packages and linking to 0.15 did the trick. ln -s /Library/Python/2.7/site-packages/sklearn .

sahuguet avatar Dec 02 '14 18:12 sahuguet

Great to hear you found a workaround for now. I think I'll eventually build on something like anaconda instead of building all packages myself but implementing that takes time as well.

On Dec 2, 2014, at 10:12 AM, Arnaud Sahuguet [email protected] wrote:

Renaming sklearn inside IPython-Notebook.app/Contents/Resources/virtualenv/lib/python2.7/site-packages and linking to 0.15 did the trick. ln -s /Library/Python/2.7/site-packages/sklearn .

— Reply to this email directly or view it on GitHub https://github.com/liyanage/ipython-notebook/issues/12#issuecomment-65276455.

liyanage avatar Dec 02 '14 18:12 liyanage

another option that seems to be working is to remove the stale package from the IPython-Notebook.app/Contents/Resources/virtualenv/lib/python2.7/site-packages . The notebook then will use the version used by Python at the OS level.

Re packaging, the issue (in this case) is not being able to update a package because it is pre-packaged with ipython. The ideal solution would be a "update button". But having a default folder when one can put their new stuff would work as well.

sahuguet avatar Dec 02 '14 18:12 sahuguet