No module named 'accelerate' even when it's installed

Am I missing something? :slight_smile:
I’ve tried reinstalling all sorts of packages.

(neox-t) $ conda install accelerate
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

Retrieving notices: ...working... done
(neox-t) $ accelerate config
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/accelerate", line 3, in <module>
    import accelerate
ModuleNotFoundError: No module named 'accelerate'

Can you try using the conda-forge channel specifically, as shown in the installation docs?

Thanks, hadnt noticed the forge channel item originally. I did try both with pip and conda though, and the odd thing was that since accelerate was installed through conda successfully even without the forge channel, I couldnt understand why the module wasn’t found at all.

I used conda to uninstall and reinstall with the forge channel and the same thing happens unfortunately.

This is an AWS ubuntu 20.04 machine learning AMI that I upgraded to 22.04. It’s running on an G5.12xlarge instance type.

$ conda install -c conda-forge accelerate
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /opt/conda/envs/neox-t

  added / updated specs:
    - accelerate


The following NEW packages will be INSTALLED:

  accelerate         conda-forge/noarch::accelerate-0.12.0-pyhd8ed1ab_0
  packaging          conda-forge/noarch::packaging-21.3-pyhd8ed1ab_0
  psutil             conda-forge/linux-64::psutil-5.9.2-py38h0a891b7_0
  pyparsing          conda-forge/noarch::pyparsing-3.0.9-pyhd8ed1ab_0
  pyyaml             conda-forge/linux-64::pyyaml-6.0-py38h0a891b7_4
  yaml               conda-forge/linux-64::yaml-0.2.5-h7f98852_2


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Retrieving notices: ...working... done
(neox-t) $ accelerate config
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/accelerate", line 3, in <module>
    import accelerate
ModuleNotFoundError: No module named 'accelerate'
1 Like

I met the same error as you, have you solved it yet?

(py39) qinsimiao@dell:~/ce_pretrain$ accelerate config
Traceback (most recent call last):
File “/data/qinsimiao/.local/bin/accelerate”, line 5, in
from accelerate.commands.accelerate_cli import main
ModuleNotFoundError: No module named ‘accelerate’

1 Like