From 645fa02e67174fc1e2c228351314c8cfdf3cdad0 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 18 Apr 2020 03:04:48 +0000 Subject: [PATCH] Filter out None of site.USER_SITE in api_template_v1.__init__.py Signed-off-by: Yong Tang --- tensorflow/api_template_v1.__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/api_template_v1.__init__.py b/tensorflow/api_template_v1.__init__.py index f2856f893bb..dad91f2d5b2 100644 --- a/tensorflow/api_template_v1.__init__.py +++ b/tensorflow/api_template_v1.__init__.py @@ -126,7 +126,7 @@ from tensorflow.python.lib.io import file_io as _fi # Get sitepackages directories for the python installation. _site_packages_dirs = [] -_site_packages_dirs += [_site.USER_SITE] +_site_packages_dirs += [] if _site.USER_SITE is None else [_site.USER_SITE] _site_packages_dirs += [_p for _p in _sys.path if 'site-packages' in _p] if 'getsitepackages' in dir(_site): _site_packages_dirs += _site.getsitepackages()