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

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

Closed
kravivar opened this issue Feb 23, 2017 · 6 comments
Closed

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

kravivar opened this issue Feb 23, 2017 · 6 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale Windows
Milestone

Comments

@kravivar
Copy link

kravivar commented Feb 23, 2017

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

@gtmanfred
Copy link
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

@gtmanfred gtmanfred added Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 TEAM Core Windows labels Feb 23, 2017
@gtmanfred gtmanfred added this to the Approved milestone Feb 23, 2017
@gtmanfred
Copy link
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

@wtfiwtz
Copy link

wtfiwtz commented Mar 26, 2018

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...

@wtfiwtz
Copy link

wtfiwtz commented Mar 26, 2018

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.

@stale
Copy link

stale bot commented Jul 9, 2019

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.

@stale stale bot added the stale label Jul 9, 2019
@stale stale bot closed this as completed Jul 16, 2019
@avrajsri
Copy link

avrajsri commented Oct 6, 2019

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
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around stale Windows
Projects
None yet
Development

No branches or pull requests

4 participants