python-rope / ropevim

vim mode that uses rope library to provide features like python refactorings and code-assists
GNU General Public License v2.0
245 stars 34 forks source link

Problems installing Ropevim #73

Closed kpace closed 4 years ago

kpace commented 4 years ago

Hi, I tried installing ropevim with Vundle by adding to my .vimrc Plugin 'python-rope/ropevim' and then running PluginInstall. PluginInstall returns that ropevim is installed successfully, but when I open a Python file and try to use a rope command, there is no sign that ropevim is installed, even though a ropevim directory in ~/.vim/bundle is created.

E.g. when I press <C-c> f on some function/class nothing happens. When I run :RopeFindOccurrences I get E492: Not an editor command: RopeFindOccurrences.

I also tried installing it by running python3 setup.py install from ~/.vim/bundle/ropevim. And when I run pip freeze I see packages are successfully installed but for some reason, vim is not detecting it is installed. pip freeze output:

rope==0.14.0
ropemode==0.5
ropevim==0.7.0

I feel a bit confused about how to install it properly, thanks in advance for your help! 🙂

mcepl commented 4 years ago

From README:

You should install rope library before using ropevim.

So, just run

$ python3 -mpip install --user rope

and be happy.

lyh970817 commented 4 years ago

Hi, I have the same problem and have tried $ python3 -mpip install --user rope but doesn't seem to work. My pip freeze output is identical to the OP. Thanks!

jahagirdar commented 4 years ago

Same Problem as above. Using Vundle, pip3 freeze|grep rope rope==0.17.0 ropemode==0.5 ropevim==0.8.0

I can open the helpfile but do not see the :Rope... commands.

mcepl commented 4 years ago

You have to do both installing Python modules and installing vim plugin.

jahagirdar commented 4 years ago

It is not clear what steps I have missed out, can you please clarify?

Is there any other step necessary to complete the installation?

mcepl commented 4 years ago

Nope, it should just work. Is there any error message somewhere?

jahagirdar commented 4 years ago

None, I ran vim in verbose mode "vim -V10 a.py" and saw the following

autocommand call s:LoadFTPlugin() chdir(/home/vijayvithal/.vim/bundle/ropevim/ftplugin) fchdir() to previous dir line 17: sourcing "/home/vijayvithal/.vim/bundle/ropevim/ftplugin/python_ropevim.vim" finished sourcing /home/vijayvithal/.vim/bundle/ropevim/ftplugin/python_ropevim.vim continuing in 20_LoadFTPlugin

So it looks like it read in the plugin file, but i still do not see the Rope* commands...

sinback commented 2 years ago

I am also having this issue. help:ropevim works though. Happens with vim 8.1 and neovim 0.4.4. I'm on MacOS Catalina.

jahagirdar commented 2 years ago

Adding the following line to my vimrc worked for me.

let g:ropevim_prefer_py3=1
mcepl commented 2 years ago

I see. We can make this default.

mcepl commented 2 years ago

Adding the following line to my vimrc worked for me.

let g:ropevim_prefer_py3=1

If this helped you, then you have some old version of ropevim. At least since 0.8.0 this option should have not existed.

jahagirdar commented 2 years ago

I am currently at commit 7249d6ae11c286a5a26c64c8d68be2aa7e0cd24d (HEAD -> master) Merge: 86d9d63 0c190a3 Author: Matěj Cepl mcepl@cepl.eu Date: Thu Nov 21 15:33:26 2019 +0100

I will pull the latest changes and see whether it works without this variable....

Checked. With the latest version it is working without this variable.

meicale commented 1 year ago

I am currently at commit 7249d6a (HEAD -> master) Merge: 86d9d63 0c190a3 Author: Matěj Cepl mcepl@cepl.eu Date: Thu Nov 21 15:33:26 2019 +0100

I will pull the latest changes and see whether it works without this variable....

Checked. With the latest version it is working without this variable.

Can you repeat the config step of how to make this works?

jahagirdar commented 1 year ago

I am using Vundle as my plugin manager, so

Is sufficient.