If it blooms each spring, your tree may not be bearing fruit because it needs a second variety nearby to pollinate it. 'Bosc' is a common choice. If you don't have room for a second tree, have a second variety grafted onto your tree so you'll have a branch of pollinating blossoms within the canopy of your 'Bartlett'. If your tree has not bloomed yet, it may be a maturity issue. Standard-size pear trees may take 5 years or more to reach bearing size. If you recently planted your tree, you may simply have to be patient. Pear trees should have full sun for best production.
If your tree gets less than 6 hours of direct sunlight per day, excess shade could be causing lack of production. Like apples, pears bear on spurs on 2-year-old or older wood. Excessive pruning can keep the tree from bearing fruit by removing the fruiting spurs and by forcing the growth of too much young wood, which is nonproductive. Sometimes it helps to spread branches so they grow more laterally than upright. Use limb spreaders or weights on the limbs to create wide branch angles and boost fruit production. Similarly, too much nitrogen fertilizer forces excess vegetative growth and delays fruiting. If your tree is growing vigorously, cut back on the fertilizer. (Remember that the tree may be soaking up high-nitrogen fertilizer applied to the lawn nearby.)