Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ModuleNotFoundError: No module named 'pycodestyle'" [closed]

I have installed pycodestyle on my mac in the same path using

pip install pycodestyle

but when I check for its version I get-

    "pycodestyle" --version
Traceback (most recent call last):
  File "/Users/shashwatkhilar/tools/bin/pycodestyle", line 6, in <module>
    from pycodestyle import _main
ModuleNotFoundError: No module named 'pycodestyle'
like image 893
Shashwat Khilar Avatar asked Nov 16 '25 04:11

Shashwat Khilar


1 Answers

  1. Create a project directory demo
  2. change directory to the project directory
  3. create a virtual environment myenv
  4. Activate the virtual environment.
  5. Install pycodestyle
mkdir demo
cd demo
python3 -m venv myen
source myenv/bin/activate
pip install pycodestyle

Check whether it is installed or not using any of these commands

pip freeze

or

pycodestyle --version
like image 65
arun n a Avatar answered Nov 17 '25 19:11

arun n a