Both "weird" and "eccentric" are synonyms to one another, which means they hold similar meaning. However, in terms of speaking, weird can be viewed as something (or someone) that is unnatural, abnormal, or unappealing; while eccentric could be viewed as something "out of the ordinary", or strange.
Many times, eccentric can and WILL be used as a compliment, while weird will not be.
For example, let's look at two different situations.
"Why does he act like that? He's so weird!"
This means his behavior or actions aren't normal, therefore, he's viewed as strange.
"She likes to listen to all genres of music. She's very eccentric."
This is not viewed as an insult, rather, it's insightful. She listens to various genres of music, which can be seen as "cool"!
I hope this makes sense!