ImportError: cannot import name JIRA
See original GitHub issueI have already done pip install jira
but when I run the following it fails with ImportError: cannot import name JIRA :
import re
from jira import JIRA
jira = JIRA('https://issues.net')
# all values are samples and won't work in your code!
key_cert_data = None
key_cert_file = "cert/jiraprivatekey.pub"
with open(key_cert, 'r') as key_cert_file:
key_cert_data = key_cert_file.read()
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
python : cannot import name JIRA - Stack Overflow
fixed it. The file I was running was called jira.py so when I did from. jira import JIRA. It was trying to look...
Read more >Jira Import error - Atlassian Community
HI,I have done pip install jira==1.0.15 and pip install ... Jira Import error ... ModuleNotFoundError: No module named 'jira'.
Read more >jira.client - jira 3.4.2.dev7+gf9b84a1 documentation - Python Jira
This module implements a friendly (well, friendlier) interface between the raw JSON responses from Jira and the Resource/dict abstractions provided by this ...
Read more >[#STORM-3390] Lock python test dependencies so we don't ...
... File "/home/travis/.local/lib/python2.7/site-packages/mock/mock.py", line 69, in <module> from six import wraps ImportError: cannot import name wraps.
Read more >Jira -Python Error - General - RStudio Community
ImportError: No module named 'jira' from jira.client import JIRA import json import csv options = {'server': 'https://jira.myjira.com/', ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kuberkaul It won’t work if your file name is ‘jira.py’ [1] https://stackoverflow.com/questions/41621566/python-cannot-import-name-jira
@thakkardharmik There are a couple things that could be happening here. A. There is a clashing jira.py B. The python jira module is not installed at all C. The python jira module is not installed for the correct version
Problem A
The indicator is that
jira.__file__
will show eitherjira.py
orjira.pyc
Solution A Rename your jira.py to something else.
Problem B
Solution B It’s not actually installed so run
python -m pip install jira
orpython3 -m pip install jira
as is appropriate.Problem C
Solution C If you did a
pip install jira
it’s possible that thepip
does not match yourpython
. To make sure that you install it to the proper python you can runpython -m pip install jira
orpython3 -m pip install jira