How to use 'usr bin env python3' in Python

Every line of 'usr bin env python3' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
10def get_python3_path():
11 # If it is not working, Please replace python3_path with your local python3 path. shell: which python3
12 if (platform.system() == "Darwin"):
13 # which python3
14 path = "/usr/local/bin/python3"
15 if platform.system() == "Windows":
16 path = "python"
17 if platform.system() == "Linux":
18 path = "/usr/bin/python3"
19 return path

Related snippets