SQL VM - R Services - Python Not working

Jamie Templeman 1 Reputation point
2020-10-27T20:53:41.707+00:00

i have a azure SQL VM and have r services configured at single build time

my basic r script is working

however python doesn't work

i get this error

Msg 39021, Level 16, State 1, Line 27
Unable to launch runtime for 'Python' script. Please check the configuration of the 'Python' runtime.
Msg 39019, Level 16, State 2, Line 27
An external script error occurred:
Unable to launch the runtime. ErrorCode 0x80070490: 1168(Element not found.).

i have ensured sql server launchpad service is running

how do i get this working?

SQL Server on Azure Virtual Machines
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,891 Reputation points Microsoft Employee
    2020-10-28T05:55:42.69+00:00

    @Jamie Templeman Apologies for the delay in response and all the inconvenience caused because of the issue.

    Can you please check if The SQLRUserGroup group and MSSQLLaunchpad account have "Read & Execute" access to the R_SERVICES folder.

    Another reason might be that R natively doesn’t understand anything but directories which are only 8 characters long. If there are more letters than this in a directory, which is always the case with the default SQL Server directories, internally the directory is read as the first 8 characters and a tilde(~). You can try to create a new directory with short names D:\Rwork and changed the working directory to the new subdirectory Rwork by updating the rlauncher.config file and restarting the SQL Server Launchpad Service. You need to delete the previous working directory, which was in the default location C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ExtensibilityData . When SQL Server creates this subdirectory, it also includes subdirectories for all of the users. When you create the new directory, it wont have those subdirectories added. You need to copy the subdirectories from the old working directory to the new one and try again.

    You can refer to this as well for more info.

    Hope it helps!!!

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics

    Note : There are few articles in the mentioned answer which are not the official documentation from Microsoft side, so we can't confirm on the working of components as mentioned in the article.We have just tried to provide you the information which can be helpful to you with the current issue you are facing and help you in resolving the same.

    1 person found this answer helpful.
    0 comments No comments