ImportError ropevim using ropevim plugin in vim
Asked Answered
R

3

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.

Rath answered 31/12, 2014 at 13:54 Comment(0)
W
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! :)

Warnock answered 31/12, 2014 at 14:1 Comment(2)
klen/python-mode seems to not redirect to python-mode/python-mode. It may be worth updating to the newest version of the link.Bwana
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.Bwana
T
7

Install ropevim using pip install ropevim

Tolkan answered 18/4, 2015 at 5:36 Comment(0)
S
1

ropevim is currently a Python 2 project.

pip2 install --user --update ropevim
Sorel answered 24/6, 2019 at 6:47 Comment(1)
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.Bwana
W
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! :)

Warnock answered 31/12, 2014 at 14:1 Comment(2)
klen/python-mode seems to not redirect to python-mode/python-mode. It may be worth updating to the newest version of the link.Bwana
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.Bwana

© 2022 - 2024 — McMap. All rights reserved.