I have a dockerfile as shown below:
FROM python:3.7.9
WORKDIR /csr
COPY . /csr/
RUN python3 -m pip install -r requirements.txt
COPY main.py /csr/
CMD ["python3", "main.py"]
requirements.txt
:
atlassian
pandas
docker container shows that atlassian
is installed:
root@41675649fc2f:/csr# pip3 list
Package Version
------------------ -----------
atlassian 0.0.0
However the module import throwing error:
docker run csr_python
Traceback (most recent call last):
File "main.py", line 3, in <module>
import confluence_csr
File "/csr/confluence_csr.py", line 2, in <module>
from atlassian import Confluence
ModuleNotFoundError: No module named 'atlassian'
What could be the issue?
CodePudding user response:
Use atlassian-python-api
instead of atlassian
in requirements.txt.
Here is some examples.