AttributeError: module 'pypandoc' has no attribute 'convert'

Issue #78 new
Rene Miller-Xavier created an issue

Hello there,

I have used vContact in Kbase and am excited to try it locally. However, upon installation on a WSL Ubuntu 20.04 I’m getting the below error. In the recent release of PyPandoc (version 1.8), the convert function was removed after a year of being deprecated. See similar issue here.

I tried downgrading pypandoc to 1.7.0 but then there were incompatibility errors for clusterone.

Any guidance would be appreciated.

Thank you,

Rene

\$pip install .
Processing /mnt/c/Users/Student/github/vcontact2
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
/home/renekat/miniconda3/envs/vContact2/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/mnt/c/Users/Student/github/vcontact2/setup.py", line 3, in <module>
setup(name='vcontact2',
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/site-packages/setuptools/dist.py", line 459, in init
_Distribution.init(
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/distutils/dist.py", line 292, in init
self.finalize_options()
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/site-packages/setuptools/dist.py", line 837, in finalize_options
ep(self)
File "/home/renekat/miniconda3/envs/vContact2/lib/python3.8/site-packages/setuptools/dist.py", line 858, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/mnt/c/Users/Student/github/vcontact2/.eggs/setuptools_markdown-0.4.1-py3.8.egg/setuptools_markdown.py", line 43, in long_description_markdown_filename
output = pypandoc.convert(markdown_filename, 'rst', format='md')
AttributeError: module 'pypandoc' has no attribute 'convert'
[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.

After installing pypandoc v 1.7.0 I got the error:

ERROR: Could not find a version that satisfies the requirement clusterone>=1.0 (from vcontact2) (from versions: 0.6.0, 0.6.3, 0.6.5, 0.6.6, 0.6.7, 0.7.0, 0.7.1, 0.7.2, 0.7.4, 0.8.0.dev1, 0.8.0a0, 0.8.0a1, 0.8.0, 0.8.1, 0.9.0a0, 0.9.0a2, 0.9.0a3, 0.9.0, 0.9.1, 0.10.0a0, 0.10.0a1, 0.10.0a2, 0.10.0a3, 0.10.0a4, 0.10.0a5, 0.10.0a6, 0.10.0a7, 0.10.0a8, 0.10.0, 0.10.1, 0.10.2a0, 0.10.3, 0.10.4, 0.10.5, 0.10.6, 0.10.7, 0.10.8, 0.10.9, 0.11.0, 0.11.1, 0.11.2, 0.11.3a0, 0.11.3, 0.12.0a0, 0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.13.0.dev0, 0.13.0.dev1, 0.13.0a0, 0.13.0, 0.13.1a0, 0.13.1, 0.13.2a0, 0.13.3a0, 0.13.3, 0.13.4a0, 0.13.4a2, 0.13.4a3, 0.13.4, 0.14.0a2, 0.14.0a3, 0.14.0a4, 0.14.0a5, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.15.2, 0.15.3)
ERROR: No matching distribution found for clusterone>=1.0

Comments (2)

  1. Sasha-William Ménard-Mérette

    Hello there, I have the same problem. It seems like there is no such thing as a clusterone v.1.0 that can be installed through pip. I tried downgrading the required version from 1.0 to 0.15.3 in setup.py which seemed to work at first glance, but then I got stuck with multiple errors in the code when executing the program:

    Traceback (most recent call last):
    File "/project/6066563/software/env_vCONTACT2/bin/vcontact2", line 25, in <module>
    import vcontact2.contig_clusters
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/vcontact2/contig_clusters.py", line 18, in <module>
    from . import ml_functions
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/vcontact2/ml_functions.py", line 2, in <module>
    from sklearn.model_selection import StratifiedKFold
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/init.py", line 64, in <module>
    from .base import clone
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/base.py", line 13, in <module>
    from .utils.fixes import signature
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/utils/init.py", line 14, in <module>
    from . import _joblib
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/utils/_joblib.py", line 22, in <module>
    from ..externals import joblib
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/init.py", line 119, in <module>
    from .parallel import Parallel
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/parallel.py", line 28, in <module>
    from ._parallel_backends import (FallbackToBackend, MultiprocessingBackend,
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 22, in <module>
    from .executor import get_memmapping_executor
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/executor.py", line 14, in <module>
    from .externals.loky.reusable_executor import get_reusable_executor
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/externals/loky/init.py", line 12, in <module>
    from .backend.reduction import set_loky_pickler
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/externals/loky/backend/reduction.py", line 125, in <module>
    from sklearn.externals.joblib.externals import cloudpickle # noqa: F401
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/init.py", line 3, in <module>
    from .cloudpickle import *
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 167, in <module>
    _cell_set_template_code = _make_cell_set_template_code()
    File "/project/6066563/software/env_vCONTACT2/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 148, in _make_cell_set_template_code
    return types.CodeType(
    TypeError: an integer is required (got type bytes)

    Any help would be appreciated!

  2. Ben Bolduc

    Thank you for bringing up this issue. There are two issues here, one is that clusterone has two separate versionings for conda (1.0) and pip (0.15.3). If you install the pip version, calling --help reveals version 1.0. I’ve side-skirted this issue by only requiring clusterone without specifying a version. Bioconda should install the “latest” clusterone version, and pip will recognize that it’s installed. Alternatively, installing the pip version will have no impact on whether or not it was installed through bioconda.

    The second issue is regarding updates to setuptools and the use of markdown. I have updated the setup.py to reflect changes in how markdown is handled.

    Both issues should be fixed with 0.11.2 - both installed through Bitbucket and Bioconda. I’ve also updated the readme to reflect this.

    My local testing was sucessful, but please let me know if this isn’t resolved, I’ll look into it.

  3. Log in to comment