ModuleNotFoundError: No module named 'dash'

I’m certain this has been asked before but I haven’t been able to resolve it on this forum or anywhere else for that matter.

In short:

I have a conda environment with what used to be a working Dash app. To get a handle on dotfiles, I installed chezmoi and then my troubles started. When I now go to run the app, I end up with the error that’s the title.

Here is what I’ve tried so far

Realize that part of the actions were sparked more due to getting things back to functional after the chezmoi debacle and others were based off general answers specific to Dash but elsewhere.

  1. New conda environment using requirements.txt. That ended up being unresolved due to pip/conda issue.

  2. New conda environment using just the core elements needed.

  3. Verify the conda supplied address (e.g. conda install -c conda-forge dash)

  4. Installing Dash with pip.

  5. Updating other dash components (based on this ) – both with conda and pip

  6. Other efforts:

Here is my best guess – but I don’t know how/if it helps or how, specifically, to resolve it.

I think this might have to do with $PATH. That said, my system python, conda and pretty much everything else I can have managed by homebrew is. But I say this due to a somewhat related issue I have with PyTorch not being able to find fire even though it, like Dash is for its conda environment, is listed in the conda list.

where python
python: aliased to /opt/homebrew/bin/python3
/opt/homebrew/Caskroom/miniforge/base/envs/Quakes/bin/python
❯ where dash
/bin/dash

So while I don’t think this is a Dash issue exactly (after all, it was working just fine), I’m hoping someone can tell me how to unfuck this.

Thanks very much!

In case anyone else ends up here with a similar problem, this ended up being my solution. My sense was this was a PATH issue, which is what it turned out to be.

The culprit seems to be an alias in my .zshrc that needed to be commented out/removed.

alias python=/opt/homebrew/bin/python3

Now, this didn’t fix the other issue but that wasn’t with Dash and it’s fairly likely those who have this same problem later will have a similarly related though different solution.

So, PATH issues and you need to start with your shell config or .zshrc (or similar) file.