Repository navigation
Release 3.10.1 (macos/homebrew): ModuleNotFoundError: No module named 'yaml' #887
Copy link
Copy link
Closed
Labels
Description
Description
Perhaps virtualenv dependency issue with python 3.12?
Fix
brew tap-new $USER/local-commitizenbrew tap homebrew/corebrew extract --version=3.10.0 commitizen $USER/local-commitizenHOMEBREW_NO_AUTO_UPDATE=1 brew install $USER/local-commitizen/commitizen@3.10.0(HOMEBREW_NO_AUTO_UPDATEis personal preference to be unset later)cz version->3.10.0- :)
Steps to reproduce
- Install commitizen via homebrew
brew install commitizen - Run
cz ModuleNotFoundError: No module named 'yaml'
Current behavior
❯ cz
Traceback (most recent call last):
File "/opt/homebrew/bin/cz", line 5, in <module>
from commitizen.cli import main
File "/opt/homebrew/Cellar/commitizen/3.10.1/libexec/lib/python3.12/site-packages/commitizen/__init__.py", line 6, in <module>
from commitizen.cz.base import BaseCommitizen
File "/opt/homebrew/Cellar/commitizen/3.10.1/libexec/lib/python3.12/site-packages/commitizen/cz/__init__.py", line 10, in <module>
from commitizen.cz.base import BaseCommitizen
File "/opt/homebrew/Cellar/commitizen/3.10.1/libexec/lib/python3.12/site-packages/commitizen/cz/base.py", line 9, in <module>
from commitizen.config.base_config import BaseConfig
File "/opt/homebrew/Cellar/commitizen/3.10.1/libexec/lib/python3.12/site-packages/commitizen/config/__init__.py", line 10, in <module>
from .yaml_config import YAMLConfig
File "/opt/homebrew/Cellar/commitizen/3.10.1/libexec/lib/python3.12/site-packages/commitizen/config/yaml_config.py", line 5, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'Desired behavior
Standard functionality.
Screenshots
No response
Environment
Homebrew Health
(below warning ok as commitizen is no longer from origin)
❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo dgrebb/local-commitizen) checkoutHomebrew Details
❯ brew config
HOMEBREW_VERSION: 4.1.15-36-gc0c8a4d
ORIGIN: https://github.com/Homebrew/brew
HEAD: c0c8a4dd4dd19ec16deb429abd50cdf82ea33b27
Last commit: 32 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 16ffa0a31c87d9bdfab5aa8f3d9f031791c12cd6
Core tap last commit: 22 minutes ago
Core tap branch: master
Core tap JSON: 16 Oct 00:47 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.42.0 => /opt/homebrew/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.0-arm64
CLT: 15.0.0.0.1.1694021235
Xcode: 15.0
Rosetta 2: falsePython
❯ python3 -c "import platform; print(platform.system())"
DarwinMac Specifics
❯ system_profiler SPSoftwareDataType SPHardwareDataType
Software:
System Software Overview:
System Version: macOS 14.0 (23A344)
Kernel Version: Darwin 23.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name:
User Name:
Secure Virtual Memory: Enabled
System Integrity Protection: Disabled
Time since boot: 1 hour, 18 minutes
Hardware:
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro18,4
Model Number:
Chip: Apple M1 Max
Total Number of Cores: 10 (8 performance and 2 efficiency)
Memory: 64 GB
System Firmware Version: 10151.1.1
OS Loader Version: 10151.1.1Reactions are currently unavailable
Activity
dgrebb commentedon Oct 16, 2023
Thank you for a wonderful project and tool! Hope this helps, and happy to contribute to triage.
woile commentedon Oct 16, 2023
I'm gonna take a look 👀 💪🏻
ci: add py3.12 to tests (#887)
davidg-datascene commentedon Oct 16, 2023
After installing pyyaml
python3 -m pip install pyyaml
woile commentedon Oct 16, 2023
Did you also have the same error? Did you both try to uninstall and install again?
michaeltinsley commentedon Oct 16, 2023
I've got this working by running
brew reinstall $(brew deps commitizen) commitizento reinstall the dependenciesdavidg-datascene commentedon Oct 16, 2023
Yep. But this has worked for me to reinstall the dependencies - thanks
brew reinstall $(brew deps commitizen) commitizenci: add py3.12 to tests (#887)
shaun-mills commentedon Nov 8, 2023
I had the same problem with commitizen
3.12.0after a brew upgradeResolution
#887 (comment)