question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module name jnpr.junos OSX

See original GitHub issue

Getting this error, PyEz installed, and reinstalled. Ansible reinstalled. Any ideas?

Error from ansible-playbook:

TASK [Install Junos OS package] **********************************************************************************************************************************************************************************
fatal: [192.168.2.17]: FAILED! => {"changed": false, "failed": true, "msg": "ImportError: No module named jnpr.junos"}
$ ansible-galaxy list
- Juniper.junos, 1.4.2
$ python --version
Python 2.7.13
>>> import jnpr.junos
>>> jnpr.junos.__version__
'2.1.3'
>>> 
$ ansible --version
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
japahocommented, Jun 1, 2017

OK - That appears to have solved it! I am waiting for the upgrade to compelte. Thanks so much for your time! I will report back and close this when the playbook has completed

1reaction
ntwrkgurucommented, Jun 1, 2017

You’ll need to set ansible_python_interpreter in your playbook or inventory.

- hosts: extest
  vars:
    ansible_python_interpreter: /usr/local/bin/python
Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'jnpr' | Automation
I am using Windows and trying to run this python code as mentioned below but unable to get past this error: from jnpr.junos...
Read more >
ImportError: No module named jnpr.junos - Bountysource
I am getting the importError when i tried packaging the python application. Module which are causing issues is jnpr.junos.
Read more >
junos-eznc required but does not appear to be installed
... but does not appear to be installed. It can be installed using `pip install junos-eznc`"} ... ImportError: No module named cryptography.hazmat.backends
Read more >
Import Error: jnpr.junos - Python Forum
Thread Modes. Import Error: jnpr.junos ... I am trying use the library called jnpr.junos. ... ModuleNotFoundError: No module named 'jnpr'
Read more >
Mac - Python - import error: "No module named site"
pip is installed against the Python 2.7 version you downloaded (the one you see in your Applications folder), unfortunately the default Python ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found