ivanov / vim-ipython

A two-way integration between Vim and IPython 0.11+
http://github.com/ivanov/vim-ipython
1.04k stars 163 forks source link

Error with pyzmq #34

Closed seth-brown closed 12 years ago

seth-brown commented 12 years ago

I have iPython and all the dependencies installed and working. When I issue :IPython inside vim I get the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 44, in km_from_string
  File "/usr/local/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 67, in <module>
    check_for_zmq('2.1.4')
  File "/usr/local/lib/python2.7/site-packages/IPython/zmq/__init__.py", line 53, in check_for_zmq
    raise ImportError("%s requires pyzmq >= %s"%(module, minimum_version))
ImportError: IPython.zmq requires pyzmq >= 2.1.4
Press ENTER or type command to continue

I have pyzmq 2.2.0 installed via pip. Any idea what could be the problem?

mrterry commented 12 years ago

Are vim and pip using the same python? Are you sure zmq is findable?

seth-brown commented 12 years ago

Thanks for the help. zmq is in my path; however, vim is using the system Python. The issue must be with getting vim to pickup my pip Python. Any suggestions on how best to do this? I was able to find a plugin here, but it doesn't work for me.

mrterry commented 12 years ago

I've done a couple of things. 1) recompile vim using your python of choice 2) globally set PYTHONPATH to include zmq

The better solution is probably to twiddle vim's python path to point at zmq. This zmq may need to be compiled against the system python.

-matt

On Tue, Jul 24, 2012 at 1:43 PM, dr.bunsen reply@reply.github.com wrote:

Thanks for the help. zmq is in my path; however, vim is using the system Python. The issue must be with getting vim to pickup my pip python. Any suggestions on how best to do this? I was able to find a plugin here, but it doesn't work for me.


Reply to this email directly or view it on GitHub: https://github.com/ivanov/vim-ipython/issues/34#issuecomment-7232726

seth-brown commented 12 years ago

Thank you, that solved my problem!

mrterry commented 12 years ago

For future reference, which suggestion ended up working?

seth-brown commented 12 years ago

I have many Python versions so option 1 didn't work for me. I got everything working with option 2.

jamak commented 11 years ago

@drbunsen can you be more specific with what you did? I have this same problem, but explicitly setting PYTHONPATH to include zmq doesn't work for me, unfortunately. did you do anything besides export PYTHONPATH="/usr/local/lib/python2.7/site-packages/zmq:$PYTHONPATH" ?

seth-brown commented 11 years ago

Its been a while now, but I believe I just did option 2:

--- globally set PYTHONPATH to include zmq

Sorry, I can't be more helpful. As I recall this fixed the problem entirely.