You need to look at several factors. The first - what do you want the camera for? Is it just for everyday family use, a casual hobby, or do you have aspirations to something more? Many do have such aspirations, but few ever reach them.
If it is realistically going to be just for recording family and social events in your personal life, the way most people use a camera, then it doesn't really matter what system you buy into, they all have a range of lenses, flashguns, accessories that will cover your needs. You can ignore the incessant "buy Canon/Nikon they have the greatest range of lenses". They do, but unless you are looking at beginning a career in sports photography, photojournalism or similar, it would make as much sense to base your decision on the available lenses as it would to choose a family car based on the high performance "track use only" racing slicks available for the model's wheel size.
Many of these lenses so often mentioned as a basis for a camera choice cost thousands of dollars, and are not something the average camera owner is ever going to consider. If however you are one of those hobbyists who really will look at buying into a professional system, then yes, you need to look at the lenses that you are likely to need and base your camera body choice on them.
Back to your question, if it is the former, just a good family camera system, probably the Pentax would be the better choice, if the latter, and you are looking at some real expenditure down the line, Canon.