10

According to the documentation of rope-vim plugin I install python-rope and python-ropemode mode packages. However when I try to open some file using vim I get following ImportError:

 Error detected while processing function LoadRope:
 line    4:
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
 ImportError: No module named ropevim

I have found the ropevim module is already in plugin's directory but when I had tried to import it:

python -c "import ropevim"

I get another ImportError:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "ropevim.py", line 10, in <module>
  import vim
ImportError: No module named vim

Have I miss any package? Some ideas? Thank you for your help.

PaulWebbster
  • 1,480
  • 2
  • 14
  • 27

3 Answers3

7

Install ropevim using pip install ropevim

musically_ut
  • 34,028
  • 8
  • 94
  • 106
Himanshu Pandey
  • 726
  • 5
  • 13
1

ropevim is currently a Python 2 project.

pip2 install --user --update ropevim
Tom Hale
  • 40,825
  • 36
  • 187
  • 242
  • While this post was correct at the time, Python 2 is no longer support with `ropevim`. It is exclusively a Python3 project per the [project README](https://github.com/python-rope/ropevim/blob/master/README.rst). – ZaydH Sep 25 '20 at 23:54
0

I know it might not be the answer you're looking for, but I'm using klen/python-mode plugin with rope included and it's working like a charm.

I'm also using Vim-Plug to manage my plugins and it's as easy as:

Plug 'klen/python-mode', { 'for': ['python'] }

Here is my .vimrc

Hope this helps! :)

ladislas
  • 3,037
  • 19
  • 27
  • `klen/python-mode` seems to not redirect to `python-mode/python-mode`. It may be worth updating to the newest version of the link. – ZaydH Sep 25 '20 at 20:41
  • The recommended `vim-plug` syntax for `python-mode` is now: `Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }`, i.e., they recommend using the `develop` branch. – ZaydH Sep 25 '20 at 23:51