Warning: I am not a lawyer. This is not legal advice. Also, please do not attempt constructing such devices because that would be highly irresponsible and dangerous.
An important subject had not been mentioned by the existing answer. Namely, legal issues will begin even outside of the launch's context, as any device capable of facilitating what you hypothesise to do will certainly be classified as a weapon.
While Americans can legally manufacture firearms for their own personal use, doing so is illegal in Canada without a licence (source).
Here is a quote from an article about homemade gun:
It is illegal to manufacture or possess a firearm without the appropriate licence and applicable registration certificate,” Jean-Philippe Levert, a spokesperson for Public Safety Canada, told Global News in a statement.
I could imagine the engineering miracle envisioned in your mind could as well be some sort a hyper-powerful potato cannon on steroids. Like h22 suggested in this post's comment thread, a firearm is a type of gun designed to be readily carried and used by an individual; it is not reasonable to expect a space gun to fit that definition. I agree with this suggestion; such a gun would probably be classified as a cannon. Here is a relevant fragment from Wikipedia (with "spud gun" being an alias for potato cannon):
A spud gun is not considered a firearm unless it fires a projectile faster than 152.4 meters per second and at a muzzle energy exceeding 5.7 Joules [sic] based on the definition of a firearm in the Canadian Criminal Code. A spud gun may be interpreted as an imitation firearm, and therefore it would be illegal to have it in possession in a public place. The spud gun would most likely be considered a dangerous weapon, and therefore if an offense is committed with it, a possession of a dangerous weapon charge could be issued. If the air powered spud gun has soft ammunition (potatoes) that splatter or bounce on impact and is kept under 100psi the spud gun is perfectly legal.
It is obvious that any device that has to have any reasonable chance of launching objects with orbital velocity will exceed the aforementioned limits by many orders of magnitude.
What is more, you would not be able to use the less "serious" pneumatic version, because the mere power of compressed gas just won't cut it. What you would have to use would be some sort of a chemical propellant, and the constituent chemicals are highly controlled substances, too.
Certain people have already experienced a lot of (highly deserved) trouble for irresponsible operation of drones that violated laws in the context of air traffic. Imagine what liability an absolute cannonball of a stray home-made space capsule could expose you to.