Error updating to 3.0 - no module named importlib_metadata

Hi,

One system updated smoothly to 3.0 from 2.16beta, but the second (which I was updating from 2.15) failed with the attached error log. Any ideas?

Cheers
Oli

PS I tried force updating the dependencies for the worker, which seemed to work, but now when I launch a job it just hangs at launching…

CryoSPARC current version v2.15.1-live_privatebeta
          update starting on Thu Dec 10 10:51:09 PST 2020

No version specified - updating to latest version.

=============================
Updating to version v3.0.0.
=============================
CryoSPARC is running.
Stopping cryosparc
command_rtp: stopped
app: stopped
command_proxy: stopped
command_vis: stopped
webapp: stopped
command_core: stopped
database: stopped
Shut down
  Downloading master update...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  769M  100  769M    0     0  47.4M      0  0:00:16  0:00:16 --:--:-- 49.9M
  Downloading worker update...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2903M  100 2903M    0     0  60.5M      0  0:00:47  0:00:47 --:--:-- 52.3M
  Done.

 Update will now be applied to the master installation,
 followed by worker installations on other nodes.

  Deleting old files...
  Extracting...
  Done.
  Updating dependencies...
Could not find conda environment: cryosparc_master_env
You can list all discoverable environments with `conda info --envs`.

Warning: Could not activate conda environment; this indicates that a cryoSPARC installation is either incomplete or in progress
===================================================
Warning: cryoSPARC v2 dependencies and cryosparc2_worker.tar.gz detected.
Performing full v3 worker update in 10 seconds (to cancel, press Ctrl + C)
...

===================================================
Installing latest master dependencies.
===================================================

  Checking dependencies...
  Dependencies for python have changed - reinstalling...
  ------------------------------------------------------------------------
  Installing anaconda python...
  ------------------------------------------------------------------------
PREFIX=/home/user/cryosparc2_master/deps/anaconda
Unpacking payload ...
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/user/cryosparc2_master/deps/anaconda

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - ca-certificates==2020.1.1=0
    - certifi==2020.4.5.1=py37_0
    - cffi==1.14.0=py37he30daa8_1
    - chardet==3.0.4=py37_1003
    - conda-package-handling==1.6.1=py37h7b6447c_0
    - conda==4.8.3=py37_0
    - cryptography==2.9.2=py37h1ba5d50_0
    - idna==2.9=py_1
    - ld_impl_linux-64==2.33.1=h53a641e_7
    - libedit==3.1.20181209=hc058e9b_0
    - libffi==3.3=he6710b0_1
    - libgcc-ng==9.1.0=hdf63c60_0
    - libstdcxx-ng==9.1.0=hdf63c60_0
    - ncurses==6.2=he6710b0_1
    - openssl==1.1.1g=h7b6447c_0
    - pip==20.0.2=py37_3
    - pycosat==0.6.3=py37h7b6447c_0
    - pycparser==2.20=py_0
    - pyopenssl==19.1.0=py37_0
    - pysocks==1.7.1=py37_0
    - python==3.7.7=hcff3b4d_5
    - readline==8.0=h7b6447c_0
    - requests==2.23.0=py37_0
    - ruamel_yaml==0.15.87=py37h7b6447c_0
    - setuptools==46.4.0=py37_0
    - six==1.14.0=py37_0
    - sqlite==3.31.1=h62c20be_1
    - tk==8.6.8=hbc83047_0
    - tqdm==4.46.0=py_0
    - urllib3==1.25.8=py37_0
    - wheel==0.34.2=py37_0
    - xz==5.2.5=h7b6447c_0
    - yaml==0.1.7=had09818_2
    - zlib==1.2.11=h7b6447c_3


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/linux-64::certifi-2020.4.5.1-py37_0
  cffi               pkgs/main/linux-64::cffi-1.14.0-py37he30daa8_1
  chardet            pkgs/main/linux-64::chardet-3.0.4-py37_1003
  conda              pkgs/main/linux-64::conda-4.8.3-py37_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.6.1-py37h7b6447c_0
  cryptography       pkgs/main/linux-64::cryptography-2.9.2-py37h1ba5d50_0
  idna               pkgs/main/noarch::idna-2.9-py_1
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_1
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1g-h7b6447c_0
  pip                pkgs/main/linux-64::pip-20.0.2-py37_3
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py37h7b6447c_0
  pycparser          pkgs/main/noarch::pycparser-2.20-py_0
  pyopenssl          pkgs/main/linux-64::pyopenssl-19.1.0-py37_0
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py37_0
  python             pkgs/main/linux-64::python-3.7.7-hcff3b4d_5
  readline           pkgs/main/linux-64::readline-8.0-h7b6447c_0
  requests           pkgs/main/linux-64::requests-2.23.0-py37_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.87-py37h7b6447c_0
  setuptools         pkgs/main/linux-64::setuptools-46.4.0-py37_0
  six                pkgs/main/linux-64::six-1.14.0-py37_0
  sqlite             pkgs/main/linux-64::sqlite-3.31.1-h62c20be_1
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  tqdm               pkgs/main/noarch::tqdm-4.46.0-py_0
  urllib3            pkgs/main/linux-64::urllib3-1.25.8-py37_0
  wheel              pkgs/main/linux-64::wheel-0.34.2-py37_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  yaml               pkgs/main/linux-64::yaml-0.1.7-had09818_2
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Preparing transaction: done
Executing transaction: done
installation finished.
  ------------------------------------------------------------------------
    Done.
    anaconda python installation successful.
  ------------------------------------------------------------------------
  Extracting all conda packages...
  ------------------------------------------------------------------------
..........................................................................
  ------------------------------------------------------------------------
    Done.
    conda packages installation successful.
  ------------------------------------------------------------------------
  Main dependency installation completed. Continuing...
  ------------------------------------------------------------------------
  Completed.
  Currently checking hash for mongodb
  Dependencies for mongodb have changed - reinstalling...
  ------------------------------------------------------------------------
  mongodb 3.4.10 installation successful.
  ------------------------------------------------------------------------
  Completed.
  Completed dependency check.

===================================================
Successfully updated master to version v3.0.0.
===================================================

Starting cryoSPARC System master process..
Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 10, in <module>
    from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 13, in <module>
    from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 15, in <module>
    from pkg_resources import load_entry_point
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    @_call_aside
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
    f(*args, **kwargs)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'supervisor==4.2.1' distribution was not found and is required by the application
CryoSPARC is already running.
If you would like to restart, use cryosparcm restart
Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 10, in <module>
    from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 13, in <module>
    from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 15, in <module>
    from pkg_resources import load_entry_point
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    @_call_aside
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
    f(*args, **kwargs)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'supervisor==4.2.1' distribution was not found and is required by the application
CryoSPARC is running.
Stopping cryosparc
Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 10, in <module>
    from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 13, in <module>
    from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cryosparc2_master/deps/anaconda/envs/cryosparc_master_env/bin/supervisorctl", line 15, in <module>
    from pkg_resources import load_entry_point
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3252, in <module>
    @_call_aside
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3236, in _call_aside
    f(*args, **kwargs)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3265, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 584, in _build_master
    ws.require(__requires__)
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/user/cryosparc2_master/deps/anaconda/lib/python3.7/site-packages/pkg_resources/__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'supervisor==4.2.1' distribution was not found and is required by the application```

My fault - I forgot to disable my existing conda environment before updating.

After disabling my conda environment, force updating, and then force updating the worker, all is well again.

3 Likes