fisadev / vim-isort

Vim plugin to sort python imports using https://github.com/timothycrosley/isort
MIT License
219 stars 32 forks source link

No isort python module detected, you should install it. More info at https://github.com/fisadev/vim-iso rt #14

Closed ikonitas closed 7 years ago

ikonitas commented 7 years ago

Hi,

I have installed isort globally with pip install isort but whatever I try to use it gives me the error above.

fisadev commented 7 years ago

Hey, sorry for the lack of response, I had a very complicated pair of weeks (including trips).

Did you find the solution? what was the problem? There is a set of common scenarios related to this error (virtualenvs and neovim, python3 vs python2, and some weird issues with mac os)

ikonitas commented 7 years ago

Hey,

The problem was I used pip to install the isort into virtualenv, but VIM wasn't picking the isort from the virtualenv.

Then I tried to install isort globally, but this didn't work either because by typing pip --version gives this output that my pip uses python3.5 :

pip 8.1.2 from /usr/local/lib/python3.5/dist-packages/pip-8.1.2-py3.5.egg (python 3.5)

My VIM doesn't support python3 (you can find this by typing vim --version) so it didn't work again, the solution was to use pip2.7 to install isort.

pip2.7 install isort

I hope this helps and can be added to the docs.

fisadev commented 7 years ago

Thanks for the details! Yes, I must clarify this in the docs.