2
votes

I have been using Anaconda with sklearn 0.13.1 originally installed (IIRC) on win7, py2 x32:

In [2]: sklearn
Out[2]: <module 'sklearn' from 'D:\Anaconda\lib\site-packages\scikit_learn-0.13.1-py2.7-win32.egg\sklearn\__init__.pyc'>

Now I want to upgrade sklearn to 0.14.1. I tried:

  1. install sklearn 0.14 using executable installer downloaded from HERE. But it still shows the same info as above when import sklearn.
  2. I searched on my disk, now I indeed have 2 folders containing different versions:
D:\Anaconda\Lib\site-packages\scikit_learn-0.13.1-py2.7-win32.egg
D:\Anaconda\Lib\site-packages\scikit_learn-0.14.1-py2.7.egg-info

Then I try to uninstall the older version, but all the following ways failed:

  • control pannel -> uninstall programs, I can see only Python 2.7 scikit-learn-0.14.1 there to uninstall. That should be an uninstaller put on my system when installing sklearn-0.14.1 with that executable just now.
  • pip uninstall sklearn outputs:

    Cannot uninstall requirement sklearn, not installed Storing complete log in C:\Users\zhangxaochen\pip\pip.log

  • try editing D:\Anaconda\Lib\site-packages\easy-install.pth, replace this line:

    ./scikit_learn-0.13.1-py2.7-win32.egg

    with

    ./scikit_learn-0.14.1-py2.7.egg-info

Could someone tell me how can I upgrade successfully? I don't want to reinstall my python.

1

1 Answers

0
votes

Well, stupid error operation...

I did copy&past to make a backup of the original easy-install.pth with name easy-install - 副本.pth, but forgot to rename the extention to .bak . Thus python still look up this backup file and my edit of easy-install.pth took no effect ;\