RedExpect icon indicating copy to clipboard operation
RedExpect copied to clipboard

Installation Error

Open glss95 opened this issue 5 years ago • 7 comments

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.

glss95 avatar Feb 10 '21 17:02 glss95

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 avatar Feb 11 '21 13:02 Red-M

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 avatar Feb 13 '21 06:02 Red-M

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.

Red-M avatar Feb 13 '21 10:02 Red-M

I see the same problem on MacOS

Denis-Alexeev avatar Jun 25 '21 10:06 Denis-Alexeev

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.

Red-M avatar Jun 25 '21 10:06 Red-M

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

Denis-Alexeev avatar Jun 25 '21 10:06 Denis-Alexeev

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.

Red-M avatar Oct 11 '21 00:10 Red-M