R Code Environmet

Options
jkonieczny
jkonieczny Registered Posts: 13 ✭✭✭✭

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<BR />client = dataiku.api_client()<BR /><BR />params = {<BR /> "desc": {<BR /> "usableByAll":False ,<BR /> 'installCorePackages': True ,<BR /> 'installJupyterSupport': True ,<BR /> } ,<BR /> 'permissions': [<BR /> {<BR /> 'group': 'TestGroup1' ,<BR /> 'manageUsers': False ,<BR /> 'use': True ,<BR /> 'update': True ,<BR /> }<BR /> ] ,<BR />}<BR /><BR />code_env = client.create_code_env(<BR /> "R" ,<BR /> "test_r_ce" ,<BR /> "DESIGN_MANAGED" ,<BR /> params ,<BR />)<BR /><BR />code_env.update_packages()<BR />code_env.set_jupyter_support(True)

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


ExceptionTraceback (most recent call last)<BR /><ipython-input-93-5a5168c05138> in <module>()<BR /> 26 <BR /> 27 code_env.update_packages()<BR />---> 28 code_env.set_jupyter_support(True)<BR /> 29 <BR /> 30 #d = code_env.get_definition()<BR /><BR />/home/dataiku/dataiku-dss-5.1.3/python/dataikuapi/dss/admin.pyc in set_jupyter_support(self, active)<BR /> 533 raise Exception('Env update returned no data')<BR /> 534 if resp.get('messages', {}).get('error', False):<BR />--> 535 raise Exception('Env update failed : %s' % (json.dumps(resp.get('messages', {}).get('messages', {}))))<BR /> 536 return resp<BR /> 537 <BR /><BR />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?

Setup Info
    Tags
      Help me…