Our bassist never learns his bass parts and it's always left to me to write it down for him every time we practice, I want to kick him out but our singer wants to keep him because he is a friend. What should I do?

Stop writing his parts. Cold turkey, no more.

If he doesn't pick up and your band begins to fail because of it, talk to him and ask why he's not pulling his weight.

If the problem still doesn't disappear after that, talk to your band mate(s) and suggest having him removed.

You have to force him to do his own work. Otherwise he'll just keep dragging you down.
WARNING:This post contains explicit portrayals of violence; sex; violent sex; sexual violence; clowns and violent scenes of violent excess, which are definitely not suitable for all audiences.
If he's too lazy to learn his parts he obviously doesn't want to be in the band.

Tell him it's obvious he doesn't want to be in the band, otherwise he'd learn his parts. So tell him to learn his parts and that if he doesn't you 'll find somebody who will.
And no, Guitar Hero will not help. Even on expert. Really.
And make sure your singer understands the difference between good bandmates, and friends.
Fender Hot Rod Deluxe
Gibson Faded V
Warmoth Strat copy
Epiphone Hummingbird (FS!!)
Ibanez SR400QM
Fender BXR100
Reggae Bass Covers mahn!!!