A gun is composed of three very important components: the barrel, the propellant, and the projectile. Your constraints require the propellant to be available, and projectiles are ubiquitous, which means the only thing we can reasonably restrict would be the barrel.
Today, gun barrels are made of steel, but in the past they were made of various iron and copper alloys. This is a result of the fact that the propellant produces a fairly high pressure, and any metal too soft will deform or rupture instead of propel the projectile. It around this point I propose a solution.
On Earth, copper and iron are fairly common metals, meaning the development of firearms was inevitable (in my humble opinion). But what if these two metals were more rare? What if they were so rare that they were basically mythical? Some bright, enterprising inventor may still "invent" the firearm in theory, but without the proper metals from which to construct the barrels the idea would never get off the ground.
Unfortunately, this would also stunt the technological growth of your civilization. Historical ages are named after metals (Bronze Age, Iron Age, etc.) for a very good reason. Without the development of bronze and iron tools, there is no telling how civilization might develop, or if it even would. Personally I think it would find a way to thrive, but I can obviously provide no evidence to that end.
A different solution might be to limit the usefulness of metals in specific ways. We know that iron rusts already, but the corrosion is slow enough to be prevented or managed. If some change were made to the atmosphere (by natural or perhaps supernatural means) iron might corrode much more quickly, rendering it useless in any stressful job (like regularly containing an explosion) but would still leave it available for more mundane uses like simple tools. Similar limitations could be placed on copper or bronze to make it even less useful for firearms. In this regard there are many potential options limited only by imagination.
On a comparative note, Jim Butcher has a novel called The Aeronaut's Windlass set in a psudo-steampunk world. Guns are rarely used, and with extreme wariness because all iron corrodes supernaturally fast (it is never explained why this happens) and all iron objects are coated in a copper alloy for protection. Repeated firing of a gun will eat away the inner coating of the barrel, and the gun will explode after maybe 50 shots or so, meaning the only people who use firearms are either desperate or crazy. I realize that doesn't quite satisfy your requirements of "no guns at all" but I thought it worth mentioning.
Good luck!
Edit: Some commenters have raised the valid point that cannons made from weaker materials than iron and copper do exist. Wood and bamboo are a good example. However, such weapons would be unwieldy and unreliable at best, and dangerous at worst. So while the technology would technically exist for such weapons, they would very likely not be used in combat.
A good real-world comparative example would be the Zeppelin. While they exist, and were used occasionally for a short period in history, other more reliable and useful machines rendered the zeppelin obsolete. The zeppelin is now relegated to the realm of pulp fiction (where it remains absolutely awesome).
In my opinion, wooden cannons would do likewise in TrEs-2b's hypothetical world. Cannons would be designed, and perhaps even constructed and used, but their unreliability would make them a thing of fancy and not a thing of war. While I know this technically does not fulfill OP's requirement of absolutely no firearms, this solution seems the most plausible to me considering the reality check tag.