Skip to content
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

ssh2-python failed to install on windows 11 python 3.11, python 3.10 install succeded #188

Open
YevgenyFarber opened this issue Dec 28, 2022 · 1 comment

Comments

@YevgenyFarber
Copy link

ssh2-python failed to install on windows 11 python 3.11, python 3.10 install succeded

Steps to reproduce:

pip install ssh2-python

`Building wheels for collected packages: ssh2-python
Building wheel for ssh2-python (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
c:\users\yfarber\pycharmprojects\parallel\venv\Lib\site-packages\setuptools_distutils\extension.py:134: UserWarning: Unknown Extension options: 'cython_compile_time_env', 'cython_directives'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\ssh2
copying ssh2_version.py -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2_init_.py -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\agent.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\channel.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_pkey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_sftp.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_ssh2.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_stat.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\error_codes.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\fileinfo.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\knownhost.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\listener.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\pkey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\publickey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\session.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\sftp.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\sftp_handle.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\statinfo.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\utils.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2_init_.pxd -> build\lib.win-amd64-cpython-311\ssh2
running build_ext
building 'ssh2.agent' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\ssh2
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ilibssh2/include -Ic:\users\yfarber\pycharmprojects\parallel\venv\inclu
de -IC:\Users\yfarber\AppData\Local\Programs\Python\Python311\include -IC:\Users\yfarber\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933
\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22
000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcssh2\agent.c /Fobuild\temp.win-amd64-cpython-311\Release\ssh2\agent.obj
agent.c
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/local/lib /LIBPATH:c
:\users\yfarber\pycharmprojects\parallel\venv\libs /LIBPATH:C:\Users\yfarber\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\yfarber\AppData\Local\Programs\Python\Python311 /LIBPATH:c:\users\yfarber\pycharmproject
s\parallel\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\P
rogram Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64" Ws2_32.lib libssh2.lib user32.lib libcrypto64MD.lib libssl64MD.lib zlibstatic.lib /EXPORT:PyInit_agent build\temp.win-amd64-cpython-311\Release\ssh2\agent.obj /OUT:build\lib.win-amd64-cpython-311\ssh2\agent.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\ssh2\agent.cp311-win_amd64.lib
LINK : fatal error LNK1181: cannot open input file 'libssh2.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe' failed with exit code 1181
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for ssh2-python
Running setup.py clean for ssh2-python
Failed to build ssh2-python
Installing collected packages: ssh2-python, ssh-python, zope.interface, zope.event, pycparser, greenlet, cffi, gevent, parallel-ssh
Running setup.py install for ssh2-python ... error
error: subprocess-exited-with-error

× Running setup.py install for ssh2-python did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
c:\users\yfarber\pycharmprojects\parallel\venv\Lib\site-packages\setuptools_distutils\extension.py:134: UserWarning: Unknown Extension options: 'cython_compile_time_env', 'cython_directives'
warnings.warn(msg)
running install
c:\users\yfarber\pycharmprojects\parallel\venv\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\ssh2
copying ssh2_version.py -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2_init_.py -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\agent.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\channel.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_pkey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_sftp.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_ssh2.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\c_stat.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\error_codes.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\fileinfo.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\knownhost.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\listener.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\pkey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\publickey.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\session.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\sftp.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\sftp_handle.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\statinfo.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2\utils.pxd -> build\lib.win-amd64-cpython-311\ssh2
copying ssh2_init_.pxd -> build\lib.win-amd64-cpython-311\ssh2
running build_ext
building 'ssh2.agent' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\ssh2
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ilibssh2/include -Ic:\users\yfarber\pycharmprojects\parallel\venv\inclu
de -IC:\Users\yfarber\AppData\Local\Programs\Python\Python311\include -IC:\Users\yfarber\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933
\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22
000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcssh2\agent.c /Fobuild\temp.win-amd64-cpython-311\Release\ssh2\agent.obj
agent.c
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:/usr/local/lib /LIBPATH:c
:\users\yfarber\pycharmprojects\parallel\venv\libs /LIBPATH:C:\Users\yfarber\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\yfarber\AppData\Local\Programs\Python\Python311 /LIBPATH:c:\users\yfarber\pycharmproject
s\parallel\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x64" "/LIBPATH:C:\P
rogram Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x64" Ws2_32.lib libssh2.lib user32.lib libcrypto64MD.lib libssl64MD.lib zlibstatic.lib /EXPORT:PyInit_agent build\temp.win-amd64-cpython-311\Release\ssh2\agent.obj /OUT:build\lib.win-amd64-cpython-311\ssh2\agent.cp311-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-311\Release\ssh2\agent.cp311-win_amd64.lib
LINK : fatal error LNK1181: cannot open input file 'libssh2.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe' failed with exit code 1181
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ssh2-python

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.``

@pletnes
Copy link

pletnes commented Nov 16, 2023

Just a note - there are binary wheels available for python 3.10 on windows, but for python 3.11 you have to build from source. I guess noone built and uploaded wheels for 3.11/3.12 on windows yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants