After preparatory studies in Évora, where he studied languages and humanities, and courses in Mathematics and Philosophy at the University of Coimbra, where he enrolled in the year 1824, he moved in 1827 to the course of medicine at the same university, graduating in the year 1836. Suspension of classes as a result of the Portuguese Civil War (1828–1834) delayed his graduation.