Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using the JIRA API with Python 3.11

Harry Melamed March 4, 2025

Trying to use the Python JIRA package and its not working for me.

 

Hoping someone here has an answer.

Using this import statement

 

from jira import JIRA


Import resolves to its containing file

What am I doing wrong here?

2 answers

0 votes
Pasam Venkateshwarrao
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2025

Hi @Harry Melamed 

Refer the atlassian developer page https://developer.atlassian.com/ to use python in jira 

You have to use import requests

Matt Doar _Adaptavist_
Community Champion
March 10, 2025

Prasam, the original post is about using the Jira Python library, not using requests. The former makes it easier to access Jira remotely.

Harry, the problem you are having is with installing a Python library and using it. Not directly related to Jira or that library.

I find I use "python3" instead of "python" to make sure I am picking up the correct Python version when doing "pip install jira". And also when I start a Python shell. Then the example at https://jira.readthedocs.io/examples.html#quickstart should just work as expected

Harry Melamed March 10, 2025

I use pycharm IDE.   Tried to uninstall and reinstall with no success.

 

all other libraries install and work fine when using pip from the terminal 

0 votes
Matt Doar _Adaptavist_
Community Champion
March 4, 2025

Which version are you using, how did you install it and how are you running it?

Harry Melamed March 5, 2025

pip install JIRA

Python 3.11

can't get by the coding without an errorJira Library Error.png

 

Pasam Venkateshwarrao
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

@Harry Melamed you can use 

import requests

from requests.auth import HTTPBasicAuth

Harry Melamed March 5, 2025

I'm not totally sure that you are seeing the problem here.   I have no issues with the requests, but with importing and using the jira module in Python.

Pasam Venkateshwarrao
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

@Harry Melamed you can use 

jira import JIRA

Harry Melamed March 5, 2025

Once again, I'm not sure you are paying attention here.  I have tried that and posted the error that I'm seeing in my Pycharm UI.

 

 

Pasam Venkateshwarrao
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2025

@Harry Melamed 

This can be fixed by running the command like this

python3 -m pip install <package name>

If this is not the case, you may have to go in and start manually installing all dependencies if this is not being done automatically. This can happen if it was installed like pip install --user <package name> to my knowledge.

Harry Melamed March 5, 2025

the JIRA module has been installed and the error persists.

Suggest an answer

Log in or Sign up to answer