1
votes

Sadly, I always keep fighting with python environments. The current struggle is that my most recent python installed by anaconda does not see the most recent scikit-learn installed by anaconda.

Details:

23:11 victoria current$conda --version
conda 4.3.30
23:11 victoria current$source activate py36scikit
(py36scikit) 23:11 victoria current$which python
/home/.../opt/anaconda3-201611/envs/py36scikit/bin/python
(py36scikit) 23:11 victoria current$conda update scikit-learn
Fetching package metadata ...........
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/bojar/opt/anaconda3-201611/envs/py36scikit:
#
scikit-learn              0.21.1           py36hd81dba3_0  
(py36scikit) 23:12 victoria current$python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
>>> print (sklearn.__version__)
0.19.1

Can someone please explain why the correct conda-installed python does not see the conda-installed scikit-learn 0.21.1 but some older version 0.19.1 from somewhere?

Update: the same issue even with a freshly installed conda 4.6.11-py37_0, a fresh conda environment which contains scikit-learn-0.21.1. The respective python from the environment still reports sklearn of 0.19.1.

1

1 Answers

0
votes

Works for me ...

It does very much sound like a collision with some other package.

Maybe finding out the exact path of the active sklearn module will help you:

import sklearn
print(sklearn.__file__)