Skip to content

Trying to install salt-ssh on windows from powershell #39614

Closed

Description

@kravivar

Description of Question

Im trying to install salt-ssh on windows powershell using the pip and Im getting the following error. can someone help me ?

Collecting salt-ssh (from -r .\pyinstaller-requirements.txt (line 12))
  Using cached salt-ssh-2016.11.3.tar.gz
    Complete output from command python setup.py egg_info:
    2016.11.3
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\salt-ssh\setup.py", line 1238, in <module>
        setup(distclass=SaltDistribution)
      File "c:\python27\lib\distutils\core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\salt-ssh\setup.py", line 893, in __init__
        self.update_metadata()
      File "c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\salt-ssh\setup.py", line 899, in update_metadata
        attrvalue = getattr(self, attrname, None)
      File "c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\salt-ssh\setup.py", line 1006, in _property_install_
requires
        install_requires += _parse_requirements_file(SALT_WINDOWS_REQS)
      File "c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\salt-ssh\setup.py", line 140, in _parse_requirements
_file
        with open(requirements_file) as rfh:
    IOError: [Errno 2] No such file or directory: 'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-build-wrdkyj\\salt-
ssh\\requirements\\windows.txt'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\admini~1\appdata\local\temp\2\pip-build-wrdkyj\s
alt-ssh\

Setup

Needs windows server 2008 or 2012

Steps to Reproduce Issue

pip install salt-ssh ( on windows powershell )

Versions Report

https://pypi.python.org/pypi/salt-ssh/2016.11.2

Activity

  1. gtmanfred commented on Feb 23, 2017

    @gtmanfred
    Contributor

    Salt-ssh is not currently supported on windows.

    We are working on developing it to be compatible for windows, but right now it is not supported.

    Thanks,
    Daniel

  2. added
    bug
    Core
    severity-medium
    P2
    on Feb 23, 2017
  3. added this to the Approved milestone on Feb 23, 2017
  4. gtmanfred commented on Feb 23, 2017

    @gtmanfred
    Contributor

    It does look like we have a problem with this that installing with pip doesn't work on windows starting in 2016.11.

    Daniel

  5. wtfiwtz commented on Mar 26, 2018

    @wtfiwtz

    FYI as an update, I had to do the following:

    https://stackoverflow.com/questions/41843266/microsoft-windows-python-3-6-pycrypto-installation-error
    pycrypto/pycrypto#221

    cd C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build
    vcvarsall amd64
    cd \
    set CL=-FI"%VCINSTALLDIR%\tools\msvc\14.13.26128\include\stdint.h"
    
    pip install pycrypto   # not pycryptodomex or pycryptodome
    pip install pywin32
    pip install pypiwin32
    pip install salt-ssh
    

    ... but it still fails here:

    c:\>salt-ssh --help
    Traceback (most recent call last):
      File "C:\Users\smithni\AppData\Local\Programs\Python\Python36\Scripts\salt-ssh-script.py", line 11, in <module>
        load_entry_point('salt-ssh==2017.7.4', 'console_scripts', 'salt-ssh')()
      File "c:\users\smithni\appdata\local\programs\python\python36\lib\site-packages\salt\scripts.py", line 410, in salt_ss
    h
        import salt.cli.ssh
      File "c:\users\smithni\appdata\local\programs\python\python36\lib\site-packages\salt\cli\ssh.py", line 5, in <module>
        import salt.client.ssh
      File "c:\users\smithni\appdata\local\programs\python\python36\lib\site-packages\salt\client\__init__.py", line 30, in
    <module>
        import salt.config
      File "c:\users\smithni\appdata\local\programs\python\python36\lib\site-packages\salt\config\__init__.py", line 1113, i
    n <module>
        'user': salt.utils.get_user(),
      File "c:\users\smithni\appdata\local\programs\python\python36\lib\site-packages\salt\utils\__init__.py", line 304, in
    get_user
        raise CommandExecutionError("Required external libraries not found. Need 'pwd' or 'win32api")
    salt.exceptions.CommandExecutionError: Required external libraries not found. Need 'pwd' or 'win32api
    

    Not sure what is the correct library pypiwin32 or pywin32...

  6. wtfiwtz commented on Mar 26, 2018

    @wtfiwtz

    Ok I got a bit further:

    pip install psutil
    cd %USERPROFILE%\AppData\Local\Programs\Python\Python36
    python Scripts/pywin32_postinstall.py -install
    

    ... and now I can run salt-ssh --help successfully.

  7. stale commented on Jul 9, 2019

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

    If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

  8. avrajsri commented on Oct 6, 2019

    @avrajsri

    pip uninstall crypto
    Delete "crypto" Folder [C:\Users\AppData\Local\Programs\Python\Python37\Lib\site-packages]
    pip install crypto
    pip uninstall pycryptodome
    pip install pycryptodome

    pip uninstall pycryptodomex
    pip install pycryptodomex
    pip uninstall cryptography
    pip install cryptography

    Rename Folder "crypto" to "Crypto" [C:\Users\AppData\Local\Programs\Python\Python37\Lib\site-packages]

    Then Use "from Crypto.Cipher import AES"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CoreP2Windowsbugseverity-mediumstale

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions