anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

module 'yaml' not found due to pyyaml version 6.0 if git submodule update --remote is used #314

Closed mparq closed 2 years ago

mparq commented 2 years ago

Hello, I ran into this issue when following the wiki guide for multiple configs/profiles setup. This is when using python 3.

This is similar to #110, but is caused by the following:

  1. bin/dotbot injects of pyyaml/lib3 to python path but pyyaml/lib3 directory does not exist.
  2. pyyaml version 6 removed the lib3/ folder: https://github.com/yaml/pyyaml/commit/f20947ae251fd1a7f21ad40f9423fa4c0e167fd4
  3. specific to my installation, I copied the install-standalone and install-profile scripts from the wiki above. These scripts are slightly outdated from the current default install.sh script. Specifically, the wiki scripts have git submodule update --init --recursive --remote. --remote is the problem flag in the wiki scripts. That flag will check out the latest commit in pyyaml submodule from its remote, rather than using the current submodule commit pinned in dotbot repo

Suggestion: update wiki page and replace the git submodule update --init --recursive --remote line with the two lines from current install.sh script. (I'd submit a quick PR for it but not familiar w/ github wiki)

git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"

Thanks for the great work on this project!

anishathalye commented 2 years ago

Thanks for finding the issue and suggesting a fix!

Anyone can edit the wiki from the web UI: just go to the wiki and click the edit button in the top right. I'll give you a chance to make the edits yourself (and that way, your name will be in the wiki's commit history!). If you don't get around to it, I can make the changes in a week or so.

mparq commented 2 years ago

Ah, great! Updated and closing this issue.

anishathalye commented 2 years ago

Thank you!