Let me start by saying, there is a difference between writing a book length narrative, and "writing a book", as in a publishing company taking an interest and publishing it. I mean, we have self-publishing, but that's a second rate publication, etc.
I always wanted to write novels, but couldn't get any transaction. Non-technical - I could. And so I wrote some technical books, and was published by Coriolis, Prentice Hall etc. Yes, I was published, and in multiple langues, but it isn't what I really wanted. What I wanted is a fictional novel. I earned 6-figures, but it's not the same.
Would I like to write now? Yes, I would. But it would be fictional, and if it made nothing that would be fine. I'd do it for the process, which is fun.