Dataiku DSS 7 AMA is live! Learn more

R Code Environmet

Level 2
R Code Environmet

I have a need to create an R code environment through the Dataiku Python API.  I am running the following code to do so:




import dataiku
client = dataiku.api_client()

params = {
"desc": {
"usableByAll":False ,
'installCorePackages': True ,
'installJupyterSupport': True ,
} ,
'permissions': [
{
'group': 'TestGroup1' ,
'manageUsers': False ,
'use': True ,
'update': True ,
}
] ,
}

code_env = client.create_code_env(
"R" ,
"test_r_ce" ,
"DESIGN_MANAGED" ,
params ,
)

code_env.update_packages()
code_env.set_jupyter_support(True)


However, I get the following error when setting Jupyter support:




ExceptionTraceback (most recent call last)
<ipython-input-93-5a5168c05138> in <module>()
26
27 code_env.update_packages()
---> 28 code_env.set_jupyter_support(True)
29
30 #d = code_env.get_definition()

/home/dataiku/dataiku-dss-5.1.3/python/dataikuapi/dss/admin.pyc in set_jupyter_support(self, active)
533 raise Exception('Env update returned no data')
534 if resp.get('messages', {}).get('error', False):
--> 535 raise Exception('Env update failed : %s' % (json.dumps(resp.get('messages', {}).get('messages', {}))))
536 return resp
537

Exception: Env update failed : [{"details": "/home/dataiku/dss/bin/python failed (exit code: 1)", "message": "Jupyter support installation failed: /home/dataiku/dss/bin/python failed (exit code: 1)", "code": "ERR_CODEENV_JUPYTER_SUPPORT_INSTALL_FAILED", "severity": "ERROR", "title": "Jupyter support installation failed"}]


How can I configure the R code environment to avoid this error?

0 Kudos
0 Replies
Labels (3)