I can't cultivate the habit of reading in the library, so that philosophy can stay away from me.
I will never get into the habit of reading in the library, which may keep me away from wonderful philosophy. Don't pursue grammar too much, it's a bit cumbersome, and the expression should be reasonable and authentic, just use the least words to express the meaning. If you can use attribute, you don't need the attribute clause.