Search code examples
pipflake8

why can't I install flake8 by pip?


I did like this

pip install flake8

then, terminal says that it has already installed and it is in .pyenv/versions/anaconda3-2.1.0/lib/python3.4/site-packages. But,I did like this

which flake8

then, terminal says nothing. Why? I couldn't install that ?


Solution

  • It appears that your pip is using your pyenv installed version of python from anaconda. With that in mind, you should ensure that python points to that as well and do python -m flake8. That will let you run flake8.

    Flake8 does not control where it's executable is installed to, but as long as you use the same python as is being used by pip, then you will still be able to run it.