Skip to content

Instantly share code, notes, and snippets.

@rssanders3
Created March 21, 2019 03:25
Show Gist options
  • Select an option

  • Save rssanders3/b1de6f9cebf409362c6f667aa871e6e9 to your computer and use it in GitHub Desktop.

Select an option

Save rssanders3/b1de6f9cebf409362c6f667aa871e6e9 to your computer and use it in GitHub Desktop.
import site
import os
SITE_PACKAGES = site.getsitepackages()
print "All Site Packages: " + str(SITE_PACKAGES)
for site_package in SITE_PACKAGES:
test_path = site_package + "/airflow"
if os.path.exists(test_path):
AIRFLOW_INSTALL_DIR = test_path
print "Site Page Containing Airflow: " + str(AIRFLOW_INSTALL_DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment