Open bhandari-nitin opened 6 years ago
It looks like the feature_format.py file is in the tools directory and not a builtin module. I had to hard code the path in the line number 14 of the k_means_cluster.py like so:
sys.path.append("C:/ud120-projects/tools/")
I also had to hardcode the path on line 42 to make it work:
data_dict = pickle.load( open("C:/ud120-projects/final_project/final_project_dataset.pkl", "r") )
@alij thank you
On windows with python version 3.6, the file should be read in binary and the dataset.pkl needs to be encoded into unix style line endings from DOS style, see the details in this stack overflow on how to do it.
with open("E:/Udacity/ud120-projects/final_project/final_project_dataset_unix.pkl", "rb") as f:
data_dict = pickle.load(f)
The code under k_means throws an error saying "No module named feature_format". Is feature_format module deprecated in newer versions of python?