Skip to content

Instantly share code, notes, and snippets.

View fralau's full-sized avatar

Laurent Franceschetti fralau

  • SettleNext
  • Geneva, Switzerland
View GitHub Profile
@fralau
fralau / install_package.py
Created September 22, 2025 14:12
Python: install a package
def install_package(package:str):
"""
Install a package from pip
"""
try:
subprocess.check_call(["pip3", "install", package])
except subprocess.CalledProcessError:
raise NameError("Could not install package '%s'" % package)