以Linux为例:
1,最好离线安装pyrfc的包,Python3.6对应 pyrfc=2.42 https://github.com/SAP/PyRFC/releases/tag/v2.4.2
2,安装对应的操作sap的sdk:nwrfcsdk,下载安装包,然后解压到/usr/local/sap下面,完整路径/usr/local/sap/nwrfcsdk
3,设置SAPNWRFC_HOME 环境:SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk
4,创建对应的配置文件 vim /etc/ld.so.conf.d/nwrfcsdk.conf 输入:
include nwrfcsdk
/usr/local/sap/nwrfcsdk/lib
5,执行ldconfig,检查是否正常
$ ldconfig -p | grep sap # should show something like:
libsapucum.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libsapucum.so
libsapnwrfc.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libsapnwrfc.so
libicuuc.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicuuc.so.50
libicui18n.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicui18n.so.50
libicudecnumber.so (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicudecnumber.so
libicudata.so.50 (libc6,x86-64) => /usr/local/sap/nwrfcsdk/lib/libicudata.so.50
libgssapi_krb5.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
libgssapi.so.3 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgssapi.so.3
windows和mac见下面文档