fanurs / data-analysis-e15190-e14030

Data analysis for the experiment E15190-E14030 at the National Superconducting Cyclotron Laboratory (NSCL), currently known as the Facility for Rare Isotope Beams (FRIB). This experiment aims to constrain the nuclear equation of state with heavy ion collisions at intermediate energies.
https://fanurs.github.io/data-analysis-e15190-e14030
GNU General Public License v3.0
2 stars 0 forks source link

When importing sklearn, ModuleNotFoundError: No module named '_sysconfigdata_x86_64_conda_linux_gnu' #13

Closed fanurs closed 2 years ago

fanurs commented 2 years ago
Python 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/sklearn/__init__.py", line 82, in <module>
    from .base import clone
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/sklearn/base.py", line 17, in <module>
    from .utils import _IS_32BIT
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/sklearn/utils/__init__.py", line 23, in <module>
    from .class_weight import compute_class_weight, compute_sample_weight
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/sklearn/utils/class_weight.py", line 7, in <module>
    from .validation import _deprecate_positional_args
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/sklearn/utils/validation.py", line 22, in <module>
    import joblib
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/joblib/__init__.py", line 113, in <module>
    from .memory import Memory, MemorizedResult, register_store_backend
  File "$PROJECT_DIR/env_e15190/lib/python3.8/site-packages/joblib/memory.py", line 16, in <module>
    import pydoc
  File "$PROJECT_DIR/env_e15190/lib/python3.8/pydoc.py", line 366, in <module>
    class Doc:
  File "$PROJECT_DIR/env_e15190/lib/python3.8/pydoc.py", line 396, in Doc
    def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')):
  File "$PROJECT_DIR/env_e15190/lib/python3.8/sysconfig.py", line 521, in get_path
    return get_paths(scheme, vars, expand)[name]
  File "$PROJECT_DIR/env_e15190/lib/python3.8/sysconfig.py", line 511, in get_paths
    return _expand_vars(scheme, vars)
  File "$PROJECT_DIR/env_e15190/lib/python3.8/sysconfig.py", line 172, in _expand_vars
    _extend_dict(vars, get_config_vars())
  File "$PROJECT_DIR/env_e15190/lib/python3.8/sysconfig.py", line 559, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "$PROJECT_DIR/env_e15190/lib/python3.8/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'
fanurs commented 2 years ago

This solution works: https://stackoverflow.com/a/68685847/7929668

cd $PROJECT_DIR/env_e15190/lib/python3.8/
cp _sysconfigdata_x86_64_conda_cos6_linux_gnu.py _sysconfigdata_x86_64_conda_linux_gnu.py