heavenshell / vim-pydocstring

Generate Python docstring to your Python source code.
BSD 3-Clause "New" or "Revised" License
337 stars 53 forks source link

`doq` not found. Install `doq` #98

Closed ValekoZ closed 4 years ago

ValekoZ commented 4 years ago

Hello ! I tried to use this plugin with nvim v0.4.3 in a virtualenv (with python 3.8.2), I installed doq in the virtualenv and outside and in both cases I have the following error : `doq` not found. Install `doq`

Then I tried outside the venv (with doq installed in my classic python installation) and I got the same error again ...

heavenshell commented 4 years ago

@ValekoZ Sorry for late response. what is your g:pydocstring_doq_path?

https://github.com/heavenshell/vim-pydocstring/blob/master/autoload/pydocstring.vim#L13-L17

fulopkovacs commented 4 years ago

Hi @heavenshell , I think I've encountered the same issue today. The parts where the g:pydocstring_doq_path is set in the .vimrc are missing from the rendered README.rst document, because of a syntax error (namely the absence of a new line character after the relevant code directive).

I created a PR: https://github.com/heavenshell/vim-pydocstring/pull/100 (sorry for stealing the 100th PR though... ☺️ 😅 ), hope it helps.

@ValekoZ :

This is how I solved the same problem:

  1. manually installed doq
    $ pip3 install doq
  2. Looked up the path to doq in the terminal:
    $ which doq
    /Library/Frameworks/Python.framework/Versions/3.8/bin/doq
  3. Set the value of g:pydocstring_doq_path in my vim config (~/.vimrc)
    let g:pydocstring_doq_path = "/Library/Frameworks/Python.framework/Versions/3.8/bin/doq"

    I think this might be the solution for you as well.

heavenshell commented 4 years ago

Thanks!!!

ValekoZ commented 4 years ago

Thanks it works ! Sorry for replying so late I was a bit busy ^^