我正在尝试使用 NWRFC SAP 库安装 PyRFC ...经过大量工作和问题,我安装了所有东西,但是现在当我启动 python
import pyrfc
我明白了
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\MARKOZ~1\Desktop\p36env\lib\site-packages\pyrfc-1.9.7-py3.6-win-amd64.egg\pyrfc\__init__.py", line 22, in <module>
from pyrfc._pyrfc import get_nwrfclib_version, Connection, TypeDescription, FunctionDescription, Server
ImportError: DLL load failed: The specified module could not be found.
在这个链接中,我发现我应该尝试启动rfcexec.exe
在 Windows 系统上安装 SAP NW RFC Library 并将 lib 子文件夹添加到路径后,您可以从 bin 子文件夹启动 rfcexec.exe 测试程序,以验证 SAP NW RFC Lib 安装。
但是当我签入此文件夹时,我可以看到rfcexec
文件但看不到rfcexec.exe
(是的,我检查是否显示了扩展名)
我还发现这个错误可能是由于路径中没有这个库
如果您的路径不是 C:\Python27\nwrfcsdk\lib 则显然放入另一个路径 如果您忘记设置路径,那么您的 Python 代码将无法使用 C 连接器,您将收到一条错误消息: “ImportError: DLL 加载失败”</p>
所以:
我有 mwrfcsdk 文件夹:
-> bin
|
-> rfcexec (without exe)
-> startrfc (without exe)
-> demo
-> doc
-> include
|
-> sapdecf.h
-> sapnwrfc.h
-> sapuc.h
-> sapuc.h
-> sapucx.h
-> lib
|
-> libicudata34.a
-> libicudecnumber.so
-> libicui18n34.a
-> libicuuc34.a
-> libsapnwrfc.so
-> libsapucum.so
-> META-INF
-> nwrfc750P_0.manifest
我安装 pyrfc :
easy_install pyrfc-1.9.7-cp36-cp36m-win_amd64.whl
我想念什么?
编辑:
我找到了这个页面:我可以看到的链接,当 unsar 从 .sar 文件中时,我在 cmd 中没有得到相同的打印......有谁知道为什么
SAPCAR: processing archive NWRFC_48-20004559.SAR (version 2.01)
x nwrfcsdk
x nwrfcsdk/bin
x nwrfcsdk/bin/rfcexec
x nwrfcsdk/bin/startrfc
x nwrfcsdk/demo
x nwrfcsdk/demo/companyClient.c
x nwrfcsdk/demo/readme.txt
x nwrfcsdk/demo/rfcexec.cpp
x nwrfcsdk/demo/rfcexec.h
x nwrfcsdk/demo/sapnwrfc.ini
x nwrfcsdk/demo/sflightClient.c
x nwrfcsdk/demo/sso2sample.c
x nwrfcsdk/demo/startrfc.cpp
x nwrfcsdk/demo/startrfc.h
x nwrfcsdk/demo/stfcDeepTableServer.c
x nwrfcsdk/doc
x nwrfcsdk/include
x nwrfcsdk/include/sapdecf.h
x nwrfcsdk/include/sapnwrfc.h
x nwrfcsdk/include/sapuc.h
x nwrfcsdk/include/sapucx.h
x nwrfcsdk/lib
x nwrfcsdk/lib/libicudata34.a
x nwrfcsdk/lib/libicudecnumber.so
x nwrfcsdk/lib/libicui18n34.a
x nwrfcsdk/lib/libicuuc34.a
x nwrfcsdk/lib/libsapnwrfc.so
x nwrfcsdk/lib/libsapucum.so
x SIGNATURE.SMF
SAPCAR: 29 file(s) extracted