claranet / ansible-gendoc

Auto generate Ansible documentation
Mozilla Public License 2.0
26 stars 7 forks source link

ModuleNotFoundError: No module named 'pandas' #15

Closed germainlefebvre4 closed 2 years ago

germainlefebvre4 commented 2 years ago

The error ModuleNotFoundError: No module named 'pandas' fall on running the gendoc.

How to reproduce?

docker build . -t ansible-gendoc:0.1.0 -t ansible-gendoc:latest
docker run --user $(id -u):$(id -g) -it ansible-gendoc:latest help

Error stacktrace

Traceback (most recent call last):
  File "/usr/bin/ansible-gendoc", line 5, in <module>
    from ansible_gendoc.main import app
  File "/usr/lib/python3.10/site-packages/ansible_gendoc/main.py", line 4, in <module>
    from ansible_gendoc.gendoc import Gendoc
  File "/usr/lib/python3.10/site-packages/ansible_gendoc/gendoc.py", line 20, in <module>
    import pandas
ModuleNotFoundError: No module named 'pandas'

Trying to add pandas module into pyproject.toml file...

[tool.poetry.dependencies]
[...]
pandas = "^1.4.4"

...makes it fail again...

 > [builder 4/5] RUN <<EOF (poetry lock...):
#14 1.416 Creating virtualenv ansible-gendoc-il7asoJj-py3.10 in /root/.cache/pypoetry/virtualenvs
[...]
#14 170.8 Collecting numpy==1.23.3
#14 170.8   Downloading numpy-1.23.3.tar.gz (10.7 MB)
#14 171.2      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 28.1 MB/s eta 0:00:00
#14 172.2   Installing build dependencies: started
#14 178.8   Installing build dependencies: finished with status 'done'
#14 178.8   Getting requirements to build wheel: started
#14 179.4   Getting requirements to build wheel: finished with status 'done'
#14 179.4   Preparing metadata (pyproject.toml): started
#14 179.9   Preparing metadata (pyproject.toml): finished with status 'done'
#14 180.1 ERROR: Could not find a version that satisfies the requirement pandas==1.5.0 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0rc0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0rc0)
#14 180.1 ERROR: No matching distribution found for pandas==1.5.0
------
executor failed running [/bin/sh -c   poetry lock
  poetry export --without-hashes --format=requirements.txt > requirements.txt
  poetry build
  cp dist/*.whl .
  pip3 wheel -r requirements.txt
]: exit code: 1