添加更多Python库

时间:2016-12-08 17:35:44

标签: python azure-data-lake u-sql

是否可以向Azure Data Analytics Analytics添加比pandas,numpy和numexpr更多的Python库?具体来说,我们需要在使用U-SQL处理NetCDF文件时使用xarray,matplotlib,Basemap,pyresample和SciPy。

2 个答案:

答案 0 :(得分:2)

假设libs与已部署的Python运行时一起使用,请尝试将库上载到ADLS中的某个位置,然后在脚本中使用DEPLOY RESOURCE "path to lib";。我没有尝试过,但它应该有效。

答案 1 :(得分:1)

指的是同样的问题,它尝试了以下导致错误的方法:

  1. 下载原始ExtPy程序集。
  2. 使用UsqlPythonDeployPackage.zip中的python.exe(和pip)安装新模块
  3. 通过更换旧组件来上传新组件。
  4. 重新运行与原始ExtPy一起使用的脚本(不使用其他模块)会导致以下错误:

        DESCRIPTION
    Unhandled exception from user code: "Specified verion 3.5.1 not found in runtime: C:\Windows\TEMP\65df18c5a85b421382382bebe8773472" The details includes more information including any inner exceptions and the stack trace where the exception was raised.
    RESOLUTION
    Make sure the bug in the user code is fixed.
    DETAILS
    ==== Caught exception System.InvalidOperationException
    
       at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.LocatePython(String version)
    
       at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.InvokeLanguage(String version, String scriptname, IList`1 infiles, IList`1 outfiles)
    
       at Microsoft.MetaAnalytics.LanguageWorker.UsqlPyExecution.Run(IRowset input, IUpdatableRow output, String script, String version)
    
       at Extension.Python.Reducer.<Reduce>d__4.MoveNext()
    
       at ScopeEngine.SqlIpReducer<Extract_0_Data0,SV2_Aggregate_out0,ScopeEngine::KeyComparePolicy<Extract_0_Data0,11> >.GetNextRow(SqlIpReducer<Extract_0_Data0\,SV2_Aggregate_out0\,ScopeEngine::KeyComparePolicy<Extract_0_Data0\,11> >* , SV2_Aggregate_out0* output) in d:\data\ccs\jobs\628aa9d8-b2a4-430d-871c-29212456b09b_v0\sqlmanaged.h:line 2725
    
       at std._Func_class<void>.()(_Func_class<void>* )
    
       at RunAndHandleClrExceptions(function<void __cdecl(void)>* code)
    ERROR
    E_RUNTIME_USER_UNHANDLED_EXCEPTION_FROM_USER_CODE
    MESSAGE
    An unhandled exception from user code has been reported