0

I'm running a Jupyter Notebook to build a little ANN, but I'm having problems importing matplotlib. The code was:

import tensorflow as tf
import numpy as np
import pandas as pd
from sklearn.cross_validation import train_test_split
import matplotlib.pyplot as plt

Which gave me an error:

ValueError: unknown locale: UTF-8

on the import matplotlib line.

I googled and another question here told me I should add a couple of lines in my ~/.bash_profile, so I did, and then suddenly pandas started giving me an error:

AttributeError: module 'pandas' has no attribute 'core'

Removing those two lines from ~/.bash_profile did not help. Pandas was working fine before, but now it's not, and if I import matplotlib before pandas, I get my original error. I've tried uninstalling and reinstalling pandas to no avail.

Pedro Carvalho
  • 565
  • 1
  • 6
  • 26
  • It sounds like you've got some environment issues. It's relatively common (and very undesirable) for the system version of python and a development version you've installed to become intertwined on a Mac. If you post more about your environment setup and how you are installing modules (e.g. `pandas`), you might get some more help – J Richard Snape Jan 20 '16 at 15:34

1 Answers1

0

I had this "AttributeError: module 'pandas' has no attribute 'core'" issue today.

Switch from Anaconda python to the OS X system python resolved the problem for me.

G. Cheng
  • 1,373
  • 1
  • 11
  • 10