import yaml ModuleNotFoundError: No module named 'yaml'
See original GitHub issuesearch tried in the issue tracker
yes
describe your issue
When trying to commit changes via Pycharm, while having pre-commit install, I get this error caused in the util.py file:
import yaml ModuleNotFoundError: No module named 'yaml'
pre-commit --version
pre-commit 2.19.0
.pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.1
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports>=1.9.0]
- repo: https://github.com/tlambert03/napari-plugin-checks
rev: v0.2.0
hooks:
- id: napari-plugin-checks
# https://mypy.readthedocs.io/en/stable/introduction.html
# you may wish to add this as well!
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.910-1
# hooks:
# - id: mypy
~/.cache/pre-commit/pre-commit.log (if present)
No response
Issue Analytics
- State:
- Created a year ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named 'yaml' in Python
The Python "ModuleNotFoundError: No module named 'yaml'" occurs when we forget to install the pyyaml module before importing it or install ...
Read more >ImportError: No module named 'yaml' - python - Stack Overflow
But, while usinf python3 or any other version CLI and executing import yaml -- I am getting ImportError: No module names 'yaml'.
Read more >ModuleNotFoundError: No module named 'yaml' #291 - GitHub
Hi, I got same issue. Already installed with pip install pyyaml but got error when import yaml .Could someone give an advice for...
Read more >Fix ModuleNotFoundError (No Module Named YAML) Python ...
python #error #fix #fixed #howto Hey guys in this tutorial let's try to fix ModuleNotFoundError No module named YAML in cases where the ......
Read more >How to solve ModuleNotFoundError: No module named 'yaml'
How to solve ModuleNotFoundError: No module named 'yaml' · Solution 1: Install YAML packages · Solution 2: Ensure you use Python <= 3...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wellllllll admittedly fedora is the special snowflake here – every other linux I’ve tried always installs to
lib
even on 32bit and 64bitare you on fedora? I see a lot of mentions of fedora and similar problems – seems like they configure
lib
andlib64
which is strange and pycharm doesn’t understand it ?