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

Windows support #70

Open
BusbyActual opened this issue Jul 14, 2017 · 7 comments
Open

Windows support #70

BusbyActual opened this issue Jul 14, 2017 · 7 comments

Comments

@BusbyActual
Copy link

In the installation docs libsmi is listed as a dependency for this tool. The docs elaborate various ways of installing on OS / Linux. Is there a recommended way of installing on windows?

@vincentbernat
Copy link
Owner

Unfortunately, I have no clue. I have looked a bit if it would be easy for me to provide a wheel to avoid you the hassle, but I didn't find any answer. At one point, I may switch to PySMI to avoid the dependency to libsmi.

@jlstanley-git
Copy link

Five months later.... Any update/progress on this?
(Snimpy looks great, but my primary dev box is a Windows machine...)

@vincentbernat
Copy link
Owner

vincentbernat commented Dec 19, 2017 via email

@jlstanley-git
Copy link

"WSL"? World Surf League? :)

@vincentbernat
Copy link
Owner

It's "Windows Subsystem for Linux". It enables you to run Linux app on Windows: https://docs.microsoft.com/en-us/windows/wsl/faq.

@seans11
Copy link

seans11 commented Jan 15, 2018

If you can't do WSL (Windows Subsystem for Linux) like me because you have LTSB (Long Term Servicing Branch) you can use Docker for Windows.

Enable drive under Docker Settings -> Shared Drive
Pull desired image "docker pull centos"
Run/mount your drive "docker run -it -v c:/win/path/code:/code centos"
Check python version "python -V"
Install epel-release, python-devel, libsmi, libffi (centos specific) "yum install -y epel-release python-devel libffi-devel libsmi-devel"
Now that you have epel repo you can install pip "yum install -y python2-pip"
Time to install Snimpy "pip install snimpy"
DON'T exit the terminal at this point before you save your docker image to a new local repository or you will loose your changes.

From a new PowerShell terminal, run "docker ps". This will show your active session from first terminal. You will need the centos "Container ID" from your working session in the next command. Commit your changes with the following command "docker commit -m "Installed Snimpy and supporting libs" -a "Author" <container_id> <local_repo_name>/<image_name>"

Example:
docker commit -m "Installed Snimpy and supporting libs" -a "Me" 0b6c4dafcd2e centos/snimpy

You should now be able to use Snimpy in your script and it's accessible using the windows mount point "c:/win/path/code" and in your Centos image "/code".

It's safe to exit your Docker session at this point. Next time you want to test your Snimpy script just fire up your commited session with "docker run -it centos/snimpy", and you can view your list of images with "docker images".

@lunarspectrum
Copy link

It seems that installing wireshark puts a copy of libsmi on windows. Is there a simple way to link it to snimpy?
libsmi on wireshark

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

5 participants