pip install error: mistune has no attribute 'BlockGrammar'
Closed this issue · 4 comments
I see the pip lib has the version 1.5.3
Since I am new, I tried to install the latest version of the flirimageextractor
, but it fails.
The error message like below.
root:/usr/src/app# pip install -U flirimageextractor
Looking in indexes: https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/simple, https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/simple
Requirement already satisfied: flirimageextractor in /opt/venv/lib/python3.9/site-packages (1.2.7.1)
Collecting flirimageextractor
Using cached https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/packages/packages/2d/2d/f56f886138f85d9bfb5a93ed6cf379077ade791d95cf79f536368943b447/flirimageextractor-1.5.3-py3-none-any.whl (29 kB)
Collecting keyring==23.13.1 (from flirimageextractor)
Using cached https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/packages/packages/62/db/0e9a09b2b95986dcd73ac78be6ed2bd73ebe8bac65cba7add5b83eb9d899/keyring-23.13.1-py3-none-any.whl (37 kB)
Collecting loguru==0.7.0 (from flirimageextractor)
Using cached https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/packages/packages/71/bd/337f7a0cd2628c4c77512d78e26f93b13c327a2ddf2132001dd78c000bf4/loguru-0.7.0-py3-none-any.whl (59 kB)
Collecting logzero==1.7.0 (from flirimageextractor)
Using cached https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/packages/packages/b3/68/aa714515d65090fcbcc9a1f3debd5a644b14aad11e59238f42f00bd4b298/logzero-1.7.0-py2.py3-none-any.whl (16 kB)
Collecting m2r==0.3.1 (from flirimageextractor)
Using cached https://dsiartifactory.research.corteva.com/artifactory/api/pypi/pypi/packages/packages/94/65/fd40fbdc608298e760affb95869c3baed237dfe5649d62da1eaa1deca8f3/m2r-0.3.1.tar.gz (16 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-rhomrp3a/m2r_e2e3a455770048528a274a680b21ab08/setup.py", line 13, in <module>
from m2r import parse_from_file
File "/tmp/pip-install-rhomrp3a/m2r_e2e3a455770048528a274a680b21ab08/m2r.py", line 51, in <module>
class RestBlockGrammar(mistune.BlockGrammar):
AttributeError: module 'mistune' has no attribute 'BlockGrammar'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
i will test this out for you and provide a solution to it
Kindly, provide your system environment details including the python version
Have you ever installed mistune package before ? it looks like you are encountering error because of m2r using wrong mistune version. If so then try to install mistune 0.8.4 or older versions
I have the very same issue.
My system details:
(base) alobo@pop-os:~$ uname -a
Linux pop-os 6.6.10-76060610-generic #202401051437~1709085277~22.04~31d73d8 SMP PREEMPT_DYNAMIC Wed F x86_64 x86_64 x86_64 GNU/Linux
(base) alobo@pop-os:~$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os
The mistune I have is 3.0.1
(base) alobo@pop-os:~$ pip install mistune
Requirement already satisfied: mistune in ./.local/lib/python3.9/site-packages (3.0.1)
You suggest going back to 0.8.4, is this not going to be too old? Perhaps other packages would complain.
Anyway, What should I do to go back to mistune 0.8.4 ?
this has been fixed in the new version 1.5.5 and m2r has been moved to extra dependancy