2 typos in your sentence, should be: 生活 and 念, 念书 study
从小爱好自然科学,但为生活在柏林的医学和外科研究所念了医科。
As I child I loved the natural sciences, but to make my way in life I studied medicine in Berlin's Institute of Medicine and Surgery.
Basic meaning: He or she loved the natural sciences, but to make a living he/she studied medicine, not his/her first choice.