ImportError: No module named sklearn.cross_validation

I am using python 2.7 in Ubuntu 14.04. I installed scikit-learn, numpy and matplotlib with these commands:

    sudo apt-get install build-essential python-dev python-numpy \
    python-numpy-dev python-scipy libatlas-dev g++ python-matplotlib \
    ipython

But when I import these packages:

    from sklearn.cross_validation import train_test_split

It returns me this error:

    ImportError: No module named sklearn.cross_validation

What I need to do?

Make sure you have Anaconda installed and then create a virtualenv using conda. This will ensure all the imports work

    Python 2.7.9 |Anaconda 2.2.0 (64-bit)| (default, Mar  9 2015, 16:20:48) 
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    Anaconda is brought to you by Continuum Analytics.
    Please check out: http://continuum.io/thanks and https://binstar.org
    >>> from sklearn.cross_validation import train_test_split

From: stackoverflow.com/q/30667525