Skip to content

Commit c2b46ad

Browse files
authored
refine set_paddle_lib_path (#74373)
1 parent 196fa8a commit c2b46ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/base/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def set_paddle_lib_path():
414414
os.path.sep.join([lib_dir, '..', '..', 'paddle_custom_device'])
415415
)
416416
return
417-
if hasattr(site, 'USER_SITE'):
417+
if hasattr(site, 'USER_SITE') and site.USER_SITE:
418418
lib_dir = os.path.sep.join([site.USER_SITE, 'paddle', 'libs'])
419419
if os.path.exists(lib_dir):
420420
_set_paddle_lib_path(lib_dir)

0 commit comments

Comments
 (0)