|
@@ -52,10 +52,12 @@ def get_app_dir(app_dir=None):
|
|
|
app_dir = pjoin(sys.prefix, 'share', 'jupyter', 'lab')
|
|
|
|
|
|
# Check for a user level install.
|
|
|
+ # Ensure that USER_BASE is defined
|
|
|
if hasattr(site, 'getuserbase'):
|
|
|
- userbase = site.getuserbase()
|
|
|
- if here.startswith(userbase) and not app_dir.startswith(userbase):
|
|
|
- app_dir = pjoin(userbase, 'share', 'jupyter', 'lab')
|
|
|
+ site.getuserbase()
|
|
|
+ userbase = getattr(site, 'USER_BASE', None)
|
|
|
+ if here.startswith(userbase) and not app_dir.startswith(userbase):
|
|
|
+ app_dir = pjoin(userbase, 'share', 'jupyter', 'lab')
|
|
|
|
|
|
# Check for a system install in '/usr/local/share'.
|
|
|
elif (sys.prefix.startswith('/usr') and not
|