It has to be a qualified student loan. You need to have a 1098-E to claim it.
You cannot deduct student loan interest if the loan was from one of the following sources:
*A related person, OR
*A qualified employer plan.
Related Person: You cannot deduct interest on a loan you received from a related person. Related persons include:
*Your spouse,
*Your brothers and sisters,
*Your half brothers and half sisters,
*Your ancestors (parents, grandparents, etc.),
*Your lineal descendants (children, grandchildren, etc.), OR
*Certain corporations, partnerships, trusts, and exempt organizations.
https://ttlc.intuit.com/replies/3302319