Ultra-high-energy neutrinos serve as messengers of some of the highest energy astrophysical environments. Given that neutrinos are neutral and only interact via weak interactions, neutrinos can emerge from sources, traverse astronomical distances, and point back to their origins. Their weak interactions require large target volumes for neutrino detection. Using the Earth as a neutrino converter, terrestrial, sub-orbital, and satellite-based instruments are able to detect signals of neutrino-induced extensive air showers. In this paper, we describe the software code nuPyProp that simulates tau neutrino and muon neutrino interactions in the Earth and predicts the spectrum of the τ-leptons and muons that emerge. The nuPyProp outputs are lookup tables of charged lepton exit probabilities and energies that can be used directly or as inputs to the nuSpaceSim code designed to simulate optical and radio signals from extensive air showers induced by the emerging charged leptons. We describe the inputs to the code, demonstrate its flexibility and show selected results for τ-lepton and muon exit probabilities and energy distributions. The nuPyProp code is open source, available on github.