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 p
train_test_split is part of the module sklearn.model_selection, hence, you may need to import the module from model_selection
train_test_split
sklearn.model_selection
model_selection
Code:
from sklearn.model_selection import train_test_split