macrel icon indicating copy to clipboard operation
macrel copied to clipboard

ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_linux_gnu'

Open HaimAshk opened this issue 1 year ago • 4 comments

Hi,

I'm trying to run macrel in peptide mode for ~200,000 sequences. I get the following error:

Traceback (most recent call last):
  File "Programs/miniconda3/envs/macrel/bin/macrel", line 11, in <module>
    sys.exit(main())
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/macrel/main.py", line 282, in main
    do_predict(args, tdir)
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/macrel/main.py", line 241, in do_predict
    fs)
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/macrel/AMP_predict.py", line 7, in predict
    model1 = pickle.load(gzip.open(model1, 'rb'))
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/__init__.py", line 82, in <module>
    from .base import clone
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 25, in <module>
    from . import _joblib
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/utils/_joblib.py", line 7, in <module>
    import joblib
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/joblib/__init__.py", line 113, in <module>
    from .memory import Memory, MemorizedResult, register_store_backend
  File "Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/joblib/memory.py", line 16, in <module>
    import pydoc
  File "Programs/miniconda3/envs/macrel/lib/python3.7/pydoc.py", line 370, in <module>
    class Doc:
  File "Programs/miniconda3/envs/macrel/lib/python3.7/pydoc.py", line 402, in Doc
    def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')):
  File "Programs/miniconda3/envs/macrel/lib/python3.7/sysconfig.py", line 521, in get_path
    return get_paths(scheme, vars, expand)[name]
  File "Programs/miniconda3/envs/macrel/lib/python3.7/sysconfig.py", line 511, in get_paths
    return _expand_vars(scheme, vars)
  File "Programs/miniconda3/envs/macrel/lib/python3.7/sysconfig.py", line 172, in _expand_vars
    _extend_dict(vars, get_config_vars())
  File "Programs/miniconda3/envs/macrel/lib/python3.7/sysconfig.py", line 559, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "Programs/miniconda3/envs/macrel/lib/python3.7/sysconfig.py", line 430, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_linux_gnu'

It did run OK for a different dataset of ~600,000 peptides on the same machine so I wonder what could raise this error...

Can you please advice?

Thanks!

HaimAshk avatar Jun 07 '24 18:06 HaimAshk

This is some weird conda installation issue that I also do not understand. Can you try just running macrel on a new, clean conda environment (i.e., one with nothing but macrel on it)?

luispedro avatar Jun 10 '24 02:06 luispedro

Thanks for the quick response! Yes, it is wired... It is a clean conda env where only macrel (installed into new env using mamba: mamba install -c bioconda macrel). Even more wired, the same installation works OK for different datasets without a problem. So could it be that there is some sequence or feature created that causes this error?

HaimAshk avatar Jun 10 '24 17:06 HaimAshk

No idea how this could be happening for some datasets and not others. It is very mysterious to me

luispedro avatar Jun 11 '24 00:06 luispedro

Thanks! I have reinstalled it again in a new env and now somehow it seems to run! 😁 I do get the following warnings, but also the final predictions. Can I ignore those warnings?

Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.22.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  UserWarning,
Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:338: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.22.1 when using version 1.0.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
  UserWarning,
Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:444: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names
  f"X has feature names, but {self.__class__.__name__} was fitted without"
Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:444: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names
  f"X has feature names, but {self.__class__.__name__} was fitted without"
Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:444: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names
  f"X has feature names, but {self.__class__.__name__} was fitted without"
Programs/miniconda3/envs/macrel/lib/python3.7/site-packages/sklearn/base.py:444: UserWarning: X has feature names, but RandomForestClassifier was fitted without feature names
  f"X has feature names, but {self.__class__.__name__} was fitted without"

HaimAshk avatar Jun 11 '24 09:06 HaimAshk