All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Beauty should be taken into account when marrying; a beautiful woman could help her husband in keeping his chastity. Nonetheless, this beauty should be considered only if the woman is religious and has a good moral conduct, and it is for this reason that Islam urged us to marry a woman who has these qualities. For more benefit, please refer to Fatwa 86667.
Therefore, if the girl whom you described to be beautiful, is religious and has a good moral conduct, and fulfils the religious obligations, like performing the prayer, fasting, wearing Hijab and the like, then you should marry her since you hope that she will help you in keeping your chastity. However, if she is actually negligent in matters of her religion, like not wearing Hijab for instance, then you should not marry her, and marry the second girl whom you mentioned as being religious and has a good moral conduct. Allaah may makes good in your marriage to her. Allaah Says (what means): {... and it may be that you dislike a thing which is good for you and that you like a thing which is bad for you. Allaah knows but you do not know.}[Quran 2:216].
Nevertheless, if the learned girl is ugly, to an extent that you fear that marital life with her will not last for long, or that you will not achieve the purpose of marriage with her, then you may look for another woman as there are so many.