Unrecognized importlib.metadata modules in pyxsim

Eduardo Teófilo
  • 1
  • 25 May '23

I am running the following commands:

from soxs.utils import soxs_cfg
soxs_cfg.set("soxs", "bkgnd_nH", "0.018") 
import socks**

I already installed $ pip install --user pyxsim
from the virtual terminal,
but it keeps giving me the error

ModuleNotFoundError: No module named 'importlib.metadata'

Also try $ pip install importlib-metadata
(also other options pip3..., --upgrade pip, even calling import importlib previously, etc, but it doesn't work)
the error continues,
if someone could help me to solve the problem

Thank you so much

Dylan Nelson
  • 25 May '23

Perhaps this or this is useful.

Otherwise you could ask to pyxsim, if this is a pyxsim issue.

Eduardo Teófilo
  • 25 May '23

thank you

Edrick Wang
  • 9 Jun '23

Hello Eduardo,
I believe I encountered the same problem a while ago; the problem is the python version of the remote server (It sounds like your using the JupyterLab server provided by TNG). pyxsim requires at least 3.9 version of Python; Since you don't have the permission to upgrade the system's default python version, I fixed the problem by using pyenv (https://github.com/pyenv/pyenv), which enables you to create a virtual environment with a python version higher than the one of the machine, and in there you can install miniconda and everything else you would need.
Hope this helps a little,

Eduardo Teófilo
  • 10 Jun '23

TRUE, Edrick
That's how the problem was solved, thank you very much for the support
kind regards


  • Page 1 of 1