diff options
author | Olivia Nordquist <nolivia@google.com> | 2016-08-23 09:27:27 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-08-23 10:34:01 -0700 |
commit | 308e34fbd1277ad38dd4c7d10d3aef2712b3d4b8 (patch) | |
tree | 447503f153eadbd71844f163f9d4ce1966fe03df /util | |
parent | 5b6b8905e2937b167285cf6d8f32c494a343b369 (diff) |
fixes #3933 virtualenv using python 2.6 site
Change: 131069999
Diffstat (limited to 'util')
-rwxr-xr-x | util/python/python_config.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/util/python/python_config.sh b/util/python/python_config.sh index 76ad559f02..00619c6f82 100755 --- a/util/python/python_config.sh +++ b/util/python/python_config.sh @@ -59,8 +59,12 @@ except NameError: python_paths = [] if os.getenv('PYTHONPATH') is not None: python_paths = os.getenv('PYTHONPATH').split(':') - -all_paths = set(python_paths + site.getsitepackages()) +try: + library_paths = site.getsitepackages() +except AttributeError: + from distutils.sysconfig import get_python_lib + library_paths = get_python_lib() +all_paths = set(python_paths + library_paths) paths = [] for path in all_paths: |