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

Dosn´t run on Linux and Mac #46

Open
Phill93 opened this issue Apr 23, 2019 · 6 comments
Open

Dosn´t run on Linux and Mac #46

Phill93 opened this issue Apr 23, 2019 · 6 comments

Comments

@Phill93
Copy link

Phill93 commented Apr 23, 2019

Hi,

i have tried to run natlas on Mac and on Linux, in both cases natlas-cli.py chrashes with this error:

Traceback (most recent call last):
  File "./natlas-cli.py", line 35, in <module>
    import natlas
  File "/vagrant/natlas/__init__.py", line 2, in <module>
    from .natlas import natlas
  File "/vagrant/natlas/natlas.py", line 35, in <module>
    from .network import natlas_network
  File "/vagrant/natlas/network.py", line 29, in <module>
    from .util import *
  File "/vagrant/natlas/util.py", line 34, in <module>
    from .snmp import *
  File "/vagrant/natlas/snmp.py", line 27, in <module>
    from pysnmp.entity.rfc3413.oneliner.cmdgen import cmdgen
ImportError: No module named pysnmp.entity.rfc3413.oneliner.cmdgen
@spazman998
Copy link

looks like you don't have pysnmp installed? on windows pip install mnet gave me all those. I can browse to that python file.
C:\Program Files\Python37\Lib\site-packages\pysnmp\entity\rfc3413\oneliner\cmdgen.py

@Phill93
Copy link
Author

Phill93 commented May 3, 2019

Here is a asciinema that shows what I have installed and how i get the error message.

asciicast

@spazman998
Copy link

I see you have natlas installed... however i have installed this via mnet... which is the main collection.
pip install mnet
https://pypi.org/project/mnet/

@Phill93
Copy link
Author

Phill93 commented May 3, 2019

mnet dosn´t run under linux because its using dos line endings. If i have time i try to convert these to unix line endings

@bbrendon
Copy link

bbrendon commented Nov 23, 2019

Regarding the error :
ImportError: No module named pysnmp.entity.rfc3413.oneliner

If your "python" is python 2.7 you will get this error. If you prefix natlas-cli.py with python3 the problem will be resolved.

# head -1 natlas-cli.py
#!/usr/bin/python

# /usr/bin/python -V
Python 2.7.13

It seems the real issue is that it only supports checking which version of python 3 is running because it breaks before it can check if you're on python 2.7.

# python3 natlas-cli.py
Requires Python 3.6


# python2.7 natlas-cli.py
Traceback (most recent call last):
  File "natlas-cli.py", line 35, in <module>
    import natlas
  File "/root/natlas/natlas/__init__.py", line 2, in <module>
    from .natlas import natlas
  File "/root/natlas/natlas/natlas.py", line 35, in <module>
    from .network import natlas_network
  File "/root/natlas/natlas/network.py", line 29, in <module>
    from .util import *
  File "/root/natlas/natlas/util.py", line 34, in <module>
    from .snmp import *
  File "/root/natlas/natlas/snmp.py", line 27, in <module>
    from pysnmp.entity.rfc3413.oneliner import cmdgen
ImportError: No module named pysnmp.entity.rfc3413.oneliner

@Pintstr
Copy link

Pintstr commented Feb 8, 2020

git clone https://github.com/MJL85/natlas.git;
cd natlas;
sudo python setup.py install;
sudo python3 pip install -m pysnmp>=4.2.5 graphviz pydot;
python3 natlas-cli.py --help

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

4 participants