-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure in installing pyrfc in windows #242
Comments
Which Python version and which pyrfc version are you using? I could not reproduce with the current pyrfc and Python 3.7.6: PS C:\src\test\pyrfc> python -V
Python 3.7.6
PS C:\src\test> git clone https://github.com/sap/pyrfc.git
Cloning into 'pyrfc'...
remote: Enumerating objects: 2478, done.
remote: Counting objects: 100% (587/587), done.
remote: Compressing objects: 100% (346/346), done.
Receiving objects: 100% (2478/2478), 34.31 MiB | 8.38 MiB/s, done.d 1891 eceiving objects: 100% (2478/2478), 33.40 MiB | 8.34 MiB/s
Resolving deltas: 100% (1340/1340), done.
PS C:\src\test> cd pyrfc
PS C:\src\test\pyrfc> python setup.py bdist_wheel
750 Patch Level 8
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pyrfc
copying src\pyrfc\_exception.py -> build\lib.win-amd64-3.7\pyrfc
copying src\pyrfc\__init__.py -> build\lib.win-amd64-3.7\pyrfc
running build_ext
building 'pyrfc.pyrfc' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\pyrfc
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DSAPonNT -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATES -D_CRT_NONSTDC_NO_DEPRECATE -D_AFXDLL -DWIN32 -D_WIN32_WINNT=0x0502
-DWIN64 -D_AMD64_ -DNDEBUG -DSAPwithUNICODE -DUNICODE -D_UNICODE -DSAPwithTHREADS -D_ATL_ALLOW_CHAR_UNSIGNED -D_LARGEFILE_SOURCE -D_CONSOLE -DSAP_PLATFORM_MAKENAME=ntintel -IC:\Tools\Pythons\3.7.6\include -IC:\Tools\Pythons\3.7.6\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpsrc/pyrfc/_pyrfc.cpp /Fobuild\temp.win-amd64-3.7\Release\src/pyrfc/_pyrfc.obj -IC:\Tools\nwrfcsdk\include -IC:\Tools\Pythons\3.7.6\lib\inspect.py\Include -IC:\Tools\Pythons\3.7.6\lib\inspect.py\Include\PC /EHs /Gy /J /MD /nologo /W3 /Z7 /GL /O2 /Oy- /we4552 /we4700 /we4789
_pyrfc.cpp
src/pyrfc/_pyrfc.cpp(4021): warning C4244: '=': conversion from 'Py_ssize_t' to 'unsigned int', possible loss of data
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Tools\Pythons\3.7.6\libs /LIBPATH:C:\Tools\Pythons\3.7.6\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.24.28314\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64" sapnwrfc.lib libsapucum.lib /EXPORT:PyInit_pyrfc build\temp.win-amd64-3.7\Release\src/pyrfc/_pyrfc.obj /OUT:build\lib.win-amd64-3.7\pyrfc\pyrfc.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src/pyrfc\pyrfc.cp37-win_amd64.lib -LIBPATH:C:\Tools\nwrfcsdk\lib -LIBPATH:C:\Tools\Pythons\3.7.6\lib\inspect.py\PCbuild /NXCOMPAT /STACK:0x2000000 /SWAPRUN:NET /DEBUG /OPT:REF /DEBUGTYPE:CV,FIXUP /MACHINE:amd64 /nologo /LTCG
Creating library build\temp.win-amd64-3.7\Release\src/pyrfc\pyrfc.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src/pyrfc\pyrfc.cp37-win_amd64.exp
Generating code
Finished generating code
installing to build\bdist.win-amd64\wheel
running install
running install_lib
creating build\bdist.win-amd64
creating build\bdist.win-amd64\wheel
creating build\bdist.win-amd64\wheel\pyrfc
copying build\lib.win-amd64-3.7\pyrfc\pyrfc.cp37-win_amd64.pdb -> build\bdist.win-amd64\wheel\.\pyrfc
copying build\lib.win-amd64-3.7\pyrfc\pyrfc.cp37-win_amd64.pyd -> build\bdist.win-amd64\wheel\.\pyrfc
copying build\lib.win-amd64-3.7\pyrfc\_exception.py -> build\bdist.win-amd64\wheel\.\pyrfc
copying build\lib.win-amd64-3.7\pyrfc\__init__.py -> build\bdist.win-amd64\wheel\.\pyrfc
running install_egg_info
running egg_info
creating src\pyrfc.egg-info
writing src\pyrfc.egg-info\PKG-INFO
writing dependency_links to src\pyrfc.egg-info\dependency_links.txt
writing requirements to src\pyrfc.egg-info\requires.txt
writing top-level names to src\pyrfc.egg-info\top_level.txt
writing manifest file 'src\pyrfc.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'material'
warning: no previously-included files found matching 'PyRFC.code-workspace'
writing manifest file 'src\pyrfc.egg-info\SOURCES.txt'
Copying src\pyrfc.egg-info to build\bdist.win-amd64\wheel\.\pyrfc-2.4.2-py3.7.egg-info
running install_scripts
C:\Tools\Pythons\3.7.6\lib\site-packages\wheel\bdist_wheel.py:82: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
warn=(impl == 'cp')):
C:\Tools\Pythons\3.7.6\lib\site-packages\wheel\bdist_wheel.py:87: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may
be incorrect
sys.version_info < (3, 8))) \
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
creating build\bdist.win-amd64\wheel\pyrfc-2.4.2.dist-info\WHEEL
creating 'dist\pyrfc-2.4.2-cp37-cp37m-win_amd64.whl' and adding 'build\bdist.win-amd64\wheel' to it
adding 'pyrfc/__init__.py'
adding 'pyrfc/_exception.py'
adding 'pyrfc/pyrfc.cp37-win_amd64.pdb'
adding 'pyrfc/pyrfc.cp37-win_amd64.pyd'
adding 'pyrfc-2.4.2.dist-info/LICENSE'
adding 'pyrfc-2.4.2.dist-info/METADATA'
adding 'pyrfc-2.4.2.dist-info/WHEEL'
adding 'pyrfc-2.4.2.dist-info/top_level.txt'
adding 'pyrfc-2.4.2.dist-info/RECORD'
removing build\bdist.win-amd64\wheel
PS C:\src\test\pyrfc> |
Python -- 3.7.4 |
Could you please try if this works on your system and post the full log if there are errors: git clone https://github.com/sap/pyrfc.git
cd pyrfc
python setup.py bdist_wheel |
C:\PyRfc>git clone https://github.com/sap/pyrfc.git Getting above error while cloning. So I downloaded the zip file from github directly and unzip in C drive |
No idea what might be wrong. I could not reproduce with Python 3.7.4 either. Perhaps to try on another machine and check if correct SAP NWRFC SDK is installed, like 64 bit Windows version, not 32 bit ? |
okay, Is there any problem with Visual Studio..?? As in error it is showing like below src/pyrfc_pyrfc.cpp(21148): error C2664: 'RFC_RC RfcInstallGenericServerFunction(RFC_SERVER_FUNCTION,RFC_FUNC_DESC_CALLBACK,RFC_ERROR_INFO *)': cannot convert argument 1 from 'RFC_RC (__cdecl *)(RFC_CONNECTION_HANDLE,RFC_FUNCTION_HANDLE,RFC_ERROR_INFO *)' to 'RFC_SERVER_FUNCTION' |
Yes, it might be an issue with the build toolchain. Please check if all requirements are met: https://github.com/SAP/PyRFC#windows |
Okay and also do you have any installation steps of SAPNWRFC SDK and pyrfc for Ubuntu 18.04.3..?? |
Here it is: http://sap.github.io/PyRFC/install.html#linux You also check installation steps in these docker containers: SAP/fundamental-tools/docker |
Thank you so much...! And I'm able to install in my windows VM and I wrote some code for connection check. But I'm getting below error. Can you please suggest what is the error exactly is E:>py sapbw_connectivity.py |
Can you please check above error |
It looks like a network error. Please check your system connection parameters. You can also run the |
If you cannot install If I try telnet on a live system with instance (sysnr) 02 with random input, I run the following on command line telnet XXX.YYY.ZZZ.WWW 3302 and I get:
so I type:
and the response is
But if I cannot connect to the system becuase of any TCP/IP problems (e.g. I unplug my ethernet cable), telnet hangs with:
|
yes, I'm able to hit the host using telnet. But via python I'm not able to connect over windows VM. But I'm able to connect via python using my local windows machine |
Hi, I checked with windows server support team and they said the firewall is blocking the destination port. So, I'm unable to connect via windows VM. Thank you for the support.. |
Hi, I'm trying to install pyrfc in windows - 10 VM x64 64-bit.
The pre-requisites I already installed i.e., visual studio and SAPNWRFC SDK. But while building pyrfc wheel I'm getting below error. Can you please help me on this to fix.
C:\PyRFC>python setup.py bdist_wheel
750 Patch Level 8
running bdist_wheel
running build
running build_py
running build_ext
skipping 'src/pyrfc_pyrfc.cpp' Cython extension (up-to-date)
building 'pyrfc.pyrfc' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DSAPonNT -D_CRT_NON_CONFORMING_SWPRINTFS -D_CRT_SECURE_NO_DEPRECATES -D_CRT_NONSTDC_NO_DEPRECATE -D_AFXDLL -DWIN32 -D_WIN32_WINNT=0x0502 -DWIN64 -D_AMD64_ -DNDEBUG -DSAPwithUNICODE -DUNICODE -D_UNICODE -DSAPwithTHREADS -D_ATL_ALLOW_CHAR_UNSIGNED -D_LARGEFILE_SOURCE -D_CONSOLE -DSAP_PLATFORM_MAKENAME=ntintel "-IC:\Program Files (x86)\Python37-32\include" "-IC:\Program Files (x86)\Python37-32\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsrc/pyrfc_pyrfc.cpp /Fobuild\temp.win32-3.7\Release\src/pyrfc_pyrfc.obj -IC:\nwrfcsdk\include -IC:\Python\Python37\Include -IC:\Python\Python37\Include\PC /EHs /Gy /J /MD /nologo /W3 /Z7 /GL /O2 /Oy- /we4552 /we4700 /we4789
cl : Command line warning D9025 : overriding '/MT' with '/MD'
_pyrfc.cpp
src/pyrfc_pyrfc.cpp(21148): error C2664: 'RFC_RC RfcInstallGenericServerFunction(RFC_SERVER_FUNCTION,RFC_FUNC_DESC_CALLBACK,RFC_ERROR_INFO *)': cannot convert argument 1 from 'RFC_RC (__cdecl *)(RFC_CONNECTION_HANDLE,RFC_FUNCTION_HANDLE,RFC_ERROR_INFO *)' to 'RFC_SERVER_FUNCTION'
src/pyrfc_pyrfc.cpp(21148): note: None of the functions with this name in scope match the target type
C:\nwrfcsdk\include\sapnwrfc.h(2266): note: see declaration of 'RfcInstallGenericServerFunction'
src/pyrfc_pyrfc.cpp(29685): warning C4018: '<': signed/unsigned mismatch
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe' failed with exit status 2
The text was updated successfully, but these errors were encountered: