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

Installation Error #5

Open
glss95 opened this issue Feb 10, 2021 · 7 comments
Open

Installation Error #5

glss95 opened this issue Feb 10, 2021 · 7 comments

Comments

@glss95
Copy link

glss95 commented Feb 10, 2021

Hi,
I'm trying to install redexpect by I get the following error when running pip install redexpect.
I was able to install redexpect in the past but now is giving a problem installing redlibssh2.

Collecting redlibssh2
Using cached redlibssh2-2.0.2.tar.gz (1.1 MB)
Building wheels for collected packages: redlibssh2
Building wheel for redlibssh2 (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"'; file='"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\xxxxx\AppData\Local\Temp\pip-wheel-ou3d1d8c'
cwd: C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474
Complete output (11 lines):
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py", line 36, in
build_ssh2()
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474_setup_libssh2.py", line 24, in build_ssh2
shell=True, env=os.environ)
File "c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL' returned non-zero exit status 1.

ERROR: Failed building wheel for redlibssh2
Running setup.py clean for redlibssh2
Failed to build redlibssh2
Installing collected packages: redlibssh2
Running setup.py install for redlibssh2 ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"'; file='"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\xxxxx\AppData\Local\Temp\pip-record-jhh0p91i\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\Include\redlibssh2'
cwd: C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474
Complete output (11 lines):
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py", line 36, in
build_ssh2()
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474_setup_libssh2.py", line 24, in build_ssh2
shell=True, env=os.environ)
File "c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake ../libssh2 -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"'; file='"'"'C:\Users\xxxxx\AppData\Local\Temp\pip-install-o0ufb3xf\redlibssh2_821735bbfe6d4df5911319c7247df474\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\xxxxx\AppData\Local\Temp\pip-record-jhh0p91i\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\xxxxx\appdata\local\continuum\anaconda3\envs\red74\Include\redlibssh2' Check the logs for full command output.

@Red-M
Copy link
Owner

Red-M commented Feb 11, 2021

I don't support or test builds for Windows.
I previously was using a different libssh2 cython library but I now maintain it instead under my own fork.
While the new libssh2 library (redlibssh2) has extra features and fixes than the old one, I can't build for Windows because I need Windows build infrastructure, however, I need to provide a source distribution for piwheels to work and build.
These 3 things combined is the reason you have this error on Windows because pip falls back to the source dist on PyPi.

I don't plan on supporting Windows in redlibssh2 but if you read the repository for redlibssh2, I can make Windows bdists if someone can help me with getting Windows build infrastructure or providing the build script for Windows to build redlibssh2.

RedExpect does work on Windows but since the libssh2 cython dependency for the whole SSH library (RedSSH) does not (or rather you'll need to build the dependency on your Windows machine since no precompiled bdist exists), it is probably a consideration to remove OSX, BSD and Windows tags for the PyPi package.

@Red-M
Copy link
Owner

Red-M commented Feb 13, 2021

Give me a while to see how well some cross compiling for Windows on Linux I found.
It might allow me to build Windows compatible packages for redlibssh2.

@Red-M
Copy link
Owner

Red-M commented Feb 13, 2021

I've tried to get a mingw cross compile going but I've run into setuptools not wanting to use the other compiler and the fact that you'd need a mingw environment otherwise it might not work so this isn't possible unless someone can help with easy to manage Windows build infrastructure.

@Denis-Alexeev
Copy link

I see the same problem on MacOS

@Red-M
Copy link
Owner

Red-M commented Jun 25, 2021

OSX faces the same problem as windows builds, they cost money but luckily for OSX I may have a way to build for that OS.

@Denis-Alexeev
Copy link

Sorry. The reason was
/bin/sh: cmake: command not found
I've installed cmake
brew install cmake
and that solved the problem.

@Red-M
Copy link
Owner

Red-M commented Oct 11, 2021

macos binary wheels for almost every active version of python is now available, windows builds for binary wheels are planned but no work has been started in getting that working 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

3 participants