The man who associates chiefly with the wise and the virtuous, though he may not himself become either wise or virtuous, cannot help conceiving a certain respect at least for wisdom and virtue
 Adam Smith, The Theory of Moral Sentiments (1759). copy citation

Context

“This natural disposition to accommodate and to assimilate, as much as we can, our own sentiments, principles, and feelings, to those which we see fixed and rooted in the persons whom we are obliged to live and converse a great deal with, is the cause of the contagious effects of both good and bad company. The man who associates chiefly with the wise and the virtuous, though he may not himself become either wise or virtuous, cannot help conceiving a certain respect at least for wisdom and virtue; and the man who associates chiefly with the profligate and the dissolute, though he may not himself become profligate and dissolute, must soon lose, at least, all his original abhorrence of profligacy and dissolution of manners.” source