import subprocess subprocess.run(["python", "-m", "ipykernel", "install", "--user", "--name", "python3"], check=True)