Windows Issues #20

Closed
youngpm opened this Issue Jan 25, 2012 · 28 comments

Comments

Projects
None yet
@youngpm

youngpm commented Jan 25, 2012

Hi,

I've been trying to get GVIM and IPython to play together, without success so far on Windows 7.

Here are the steps I've taken:

  1. I launch IPython qtconsole successfully. I'm using version 0.12, what came with the EPD Python 2.7.2.
  2. :echo has('python') returns 1 for me.
  3. I source ipy.vim successfully in vim.

Things go bad for me when I attempt to run ":IPython" in vim.

I get a "Runtime Error!" alert about "R6034, An application has made an attempt to load the C runtime library incorrectly."

VIM reports the following:

Traceback (most recent call last):
File "", line 1, in
File "", line 39, in km_from_string
File "C:\Python27\lib\site-packages\IPython\zmq__init__.py", line 39, in
check_for_zmq('2.1.4')
File "C:\Python27\lib\site-packages\IPython\zmq__init__.py", line 17, in check_for_zmq
import zmq
File "C:\Python27\lib\site-packages\zmq__init__.py", line 32, in
ctypes.cdll.LoadLibrary(libzmq)
File "C:\Python27\Lib\ctypes__init__.py", line 431, in LoadLibrary
return self.dlltype(name)
File "C:\Python27\Lib\ctypes__init
_.py", line 353, in init
self._handle = _dlopen(self._name, mode)

Any idea what my issue is? From IPython i can import ctypes and zmq. I'm pretty new to Python and IPython, which is probably the biggest problem!

Thanks for any help!
-Patrick

@ivanov

This comment has been minimized.

Show comment
Hide comment
@ivanov

ivanov Jan 25, 2012

Owner

I get a "Runtime Error!" alert about "R6034, An application has made an attempt to load the C runtime library incorrectly."

Perhaps your vim is compiled against a different python than
you are launching. See if there's a difference between:

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

@unpingco successfully got vim-ipython working under windows, but
I'm not sure what his setup was.

Owner

ivanov commented Jan 25, 2012

I get a "Runtime Error!" alert about "R6034, An application has made an attempt to load the C runtime library incorrectly."

Perhaps your vim is compiled against a different python than
you are launching. See if there's a difference between:

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

@unpingco successfully got vim-ipython working under windows, but
I'm not sure what his setup was.

@youngpm

This comment has been minimized.

Show comment
Hide comment
@youngpm

youngpm Jan 25, 2012

I think I found the problem, I am pretty sure the version of vim I have was not compiled with the +python libraries. I faked myself out by adding the python.vim to the plugin directory, which is why it was returning 1! Now to get a version compiled with python!

I'll let you know if I get it going.

Thanks!

youngpm commented Jan 25, 2012

I think I found the problem, I am pretty sure the version of vim I have was not compiled with the +python libraries. I faked myself out by adding the python.vim to the plugin directory, which is why it was returning 1! Now to get a version compiled with python!

I'll let you know if I get it going.

Thanks!

@unpingco

This comment has been minimized.

Show comment
Hide comment
@unpingco

unpingco Jan 25, 2012

You also need to make sure that your VIM matches the Python version you
plan to use IPython with. I had to build VIM 7.3 from source to get it
for Python version 2.6.

Good luck!

On Wednesday, January 25, 2012 10:17:45 AM, youngpm wrote:

I think I found the problem, I am pretty sure the version of vim I have was not compiled with the +python libraries. I faked myself out by adding the python.vim to the plugin directory, which is why it was returning 1! Now to get a version compiled with python!


Reply to this email directly or view it on GitHub:
#20 (comment)

You also need to make sure that your VIM matches the Python version you
plan to use IPython with. I had to build VIM 7.3 from source to get it
for Python version 2.6.

Good luck!

On Wednesday, January 25, 2012 10:17:45 AM, youngpm wrote:

I think I found the problem, I am pretty sure the version of vim I have was not compiled with the +python libraries. I faked myself out by adding the python.vim to the plugin directory, which is why it was returning 1! Now to get a version compiled with python!


Reply to this email directly or view it on GitHub:
#20 (comment)

@youngpm

This comment has been minimized.

Show comment
Hide comment
@youngpm

youngpm Jan 25, 2012

Well I reinstalled gvim, and the python libraries are there this time! Not sure that the issue was the first go around. In any case, :include shows +python. This is gvim 7.3.46, which is supposedly compiled with Python 2.7, the flavor I'm using.

Checking

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

Vim says C:\Python27\Lib\os.pyc
Python says C:\Python27\lib\os.pyc

The case shouldn't matter on Windows right? The actual folder is Lib.

I get the same error,

Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 39, in km_from_string File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 39, in <module> check_for_zmq('2.1.4') File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 17, in check_for_zmq import zmq File "C:\Python27\lib\site-packages\zmq\__init__.py", line 32, in <module> ctypes.cdll.LoadLibrary(libzmq) File "C:\Python27\Lib\ctypes\__init__.py", line 431, in LoadLibrary return self._dlltype(name) File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode)

The same as before! Any more thoughts?

Thanks!

youngpm commented Jan 25, 2012

Well I reinstalled gvim, and the python libraries are there this time! Not sure that the issue was the first go around. In any case, :include shows +python. This is gvim 7.3.46, which is supposedly compiled with Python 2.7, the flavor I'm using.

Checking

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

Vim says C:\Python27\Lib\os.pyc
Python says C:\Python27\lib\os.pyc

The case shouldn't matter on Windows right? The actual folder is Lib.

I get the same error,

Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 39, in km_from_string File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 39, in <module> check_for_zmq('2.1.4') File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 17, in check_for_zmq import zmq File "C:\Python27\lib\site-packages\zmq\__init__.py", line 32, in <module> ctypes.cdll.LoadLibrary(libzmq) File "C:\Python27\Lib\ctypes\__init__.py", line 431, in LoadLibrary return self._dlltype(name) File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode)

The same as before! Any more thoughts?

Thanks!

@unpingco

This comment has been minimized.

Show comment
Hide comment
@unpingco

unpingco Jan 25, 2012

But, when you go to a plain python interpreter (i.e.
c:\python27\python.exe ) and do

  >>> import zmq

does it load error-free?

Thanks!

On Wednesday, January 25, 2012 11:15:52 AM, youngpm wrote:

Well I reinstalled gvim, and the python libraries are there this time! Not sure that the issue was the first go around. In any case, :include shows +python. This is gvim 7.3.46, which is supposedly compiled with Python 2.7, the flavor I'm using.

Checking

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

Vim says C:\Python27\Lib\os.pyc
Python says C:\Python27\lib\os.pyc

The case shouldn't matter on Windows right? The actual folder is Lib.

I get the same error,

Traceback (most recent call last): File "<string>", line 1, in<module> File "<string>", line 39, in km_from_string File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 39, in<module> check_for_zmq('2.1.4') File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 17, in check_for_zmq import zmq File "C:\Python27\lib\site-packages\zmq\__init__.py", line 32, in<module> ctypes.cdll.LoadLibrary(libzmq) File "C:\Python27\Lib\ctypes\__init__.py", line 431, in LoadLibrary return self._dlltype(name) File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode)

The same as before! Any more thoughts?

Thanks!


Reply to this email directly or view it on GitHub:
#20 (comment)

But, when you go to a plain python interpreter (i.e.
c:\python27\python.exe ) and do

  >>> import zmq

does it load error-free?

Thanks!

On Wednesday, January 25, 2012 11:15:52 AM, youngpm wrote:

Well I reinstalled gvim, and the python libraries are there this time! Not sure that the issue was the first go around. In any case, :include shows +python. This is gvim 7.3.46, which is supposedly compiled with Python 2.7, the flavor I'm using.

Checking

$ vim -c ':py import os; print os.file' -c ':q'
$ python -c 'import os; print os.file'

Vim says C:\Python27\Lib\os.pyc
Python says C:\Python27\lib\os.pyc

The case shouldn't matter on Windows right? The actual folder is Lib.

I get the same error,

Traceback (most recent call last): File "<string>", line 1, in<module> File "<string>", line 39, in km_from_string File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 39, in<module> check_for_zmq('2.1.4') File "C:\Python27\lib\site-packages\IPython\zmq\__init__.py", line 17, in check_for_zmq import zmq File "C:\Python27\lib\site-packages\zmq\__init__.py", line 32, in<module> ctypes.cdll.LoadLibrary(libzmq) File "C:\Python27\Lib\ctypes\__init__.py", line 431, in LoadLibrary return self._dlltype(name) File "C:\Python27\Lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode)

The same as before! Any more thoughts?

Thanks!


Reply to this email directly or view it on GitHub:
#20 (comment)

@youngpm

This comment has been minimized.

Show comment
Hide comment
@youngpm

youngpm Jan 25, 2012

Yeah, here is some output:

`

import zmq
zmq.zmq_version()
'2.1.11'
`

Importing ctypes also returns no errors. It is version 1.1.0.

youngpm commented Jan 25, 2012

Yeah, here is some output:

`

import zmq
zmq.zmq_version()
'2.1.11'
`

Importing ctypes also returns no errors. It is version 1.1.0.

@unpingco

This comment has been minimized.

Show comment
Hide comment
@unpingco

unpingco Jan 25, 2012

In a Regular console window, do

  c:> python -v

and then

>>> import zmq

and then watch the trace carefully. It should confess exactly where it
is getting the libraries. Ultimately, I think you will need to use
DependencyWalker on the PYD or DLLs in ZMQ to find out what's missing.

I hope that helps.

On Wednesday, January 25, 2012 12:23:56 PM, youngpm wrote:

Yeah, here is some output:

`

import zmq
zmq.zmq_version()
'2.1.11'
`


Reply to this email directly or view it on GitHub:
#20 (comment)

In a Regular console window, do

  c:> python -v

and then

>>> import zmq

and then watch the trace carefully. It should confess exactly where it
is getting the libraries. Ultimately, I think you will need to use
DependencyWalker on the PYD or DLLs in ZMQ to find out what's missing.

I hope that helps.

On Wednesday, January 25, 2012 12:23:56 PM, youngpm wrote:

Yeah, here is some output:

`

import zmq
zmq.zmq_version()
'2.1.11'
`


Reply to this email directly or view it on GitHub:
#20 (comment)

@ivanov

This comment has been minimized.

Show comment
Hide comment
@ivanov

ivanov Jan 27, 2012

Owner

@youngpm: you can also take a look at #21 to see if you're running into a similar issue, and if the solution proposed in this pyodbc bug solves it for you

Owner

ivanov commented Jan 27, 2012

@youngpm: you can also take a look at #21 to see if you're running into a similar issue, and if the solution proposed in this pyodbc bug solves it for you

@youngpm

This comment has been minimized.

Show comment
Hide comment
@youngpm

youngpm Feb 6, 2012

Sorry I've been out of the office on jury duty! In any case, I'm going to try what you suggest. edouardp says

"I did this with all of the *.pyd files and now I've got gvim <-> ipython 0.12 interaction going great!"

It is unclear to me which *.pyd files he is referring to.

Thanks!

youngpm commented Feb 6, 2012

Sorry I've been out of the office on jury duty! In any case, I'm going to try what you suggest. edouardp says

"I did this with all of the *.pyd files and now I've got gvim <-> ipython 0.12 interaction going great!"

It is unclear to me which *.pyd files he is referring to.

Thanks!

@tmdk

This comment has been minimized.

Show comment
Hide comment
@tmdk

tmdk Feb 15, 2012

I think he is referring to all the *.pyd files in the pyzmq package:

zmq\core\constants.pyd
zmq\core\context.pyd
zmq\core\device.pyd
zmq\core\error.pyd
zmq\core\message.pyd
zmq\core\poll.pyd
zmq\core\socket.pyd
zmq\core\stopwatch.pyd
zmq\core\version.pyd
zmq\devices\monitoredqueue.pyd
zmq\utils\initthreads.pyd
zmq\utils\rebuffer.pyd

I had the same problem as in #21 and applying the fix referred by edouardp to these files fixed it for me!

HTH

tmdk commented Feb 15, 2012

I think he is referring to all the *.pyd files in the pyzmq package:

zmq\core\constants.pyd
zmq\core\context.pyd
zmq\core\device.pyd
zmq\core\error.pyd
zmq\core\message.pyd
zmq\core\poll.pyd
zmq\core\socket.pyd
zmq\core\stopwatch.pyd
zmq\core\version.pyd
zmq\devices\monitoredqueue.pyd
zmq\utils\initthreads.pyd
zmq\utils\rebuffer.pyd

I had the same problem as in #21 and applying the fix referred by edouardp to these files fixed it for me!

HTH

@quasarj

This comment has been minimized.

Show comment
Hide comment
@quasarj

quasarj May 30, 2012

I still get the error the first time I type :IPython, but everything seems to function right after that, so I can confirm this still works!

quasarj commented May 30, 2012

I still get the error the first time I type :IPython, but everything seems to function right after that, so I can confirm this still works!

@danbe

This comment has been minimized.

Show comment
Hide comment
@danbe

danbe Jun 17, 2012

Here are the commands I used to make it run and their outputs.
Windows xp, Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)], zmq 2.2.0

Note that dependencywalker is missing ieshims.dll and wer.dll, but they don't seem to matter

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>dir

Directory of C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils

06/17/2012 09:06 AM

.
06/17/2012 09:06 AM ..
06/16/2012 02:39 PM 642 allocate.h
06/16/2012 02:39 PM 9,753 buffers.pxd
06/16/2012 02:39 PM 289 initthreads.py
06/16/2012 02:39 PM 618 initthreads.pyc
06/17/2012 09:02 AM 11,776 initthreads.pyd
06/16/2012 02:39 PM 2,407 jsonapi.py
06/16/2012 02:39 PM 2,492 jsonapi.pyc
06/12/2008 03:58 PM 739,376 mt.exe
06/16/2012 02:39 PM 1,324 pyversion_compat.h
06/16/2012 02:39 PM 286 rebuffer.py
06/16/2012 02:39 PM 609 rebuffer.pyc
06/17/2012 09:06 AM 25,600 rebuffer.pyd
06/16/2012 02:39 PM 980 strtypes.py
06/16/2012 02:39 PM 859 strtypes.pyc
06/16/2012 02:39 PM 3,514 zmq_compat.h
06/16/2012 02:39 PM 0 init.py
06/16/2012 02:39 PM 166 init.pyc

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:initthreads.pyd;#2

Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:rebuffer.pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>cd. .

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>
C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\constants.
pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\context.py
d;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\device.pyd
;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\error.pyd;
#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\message.py
d;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\stopwatch.
pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\socket.pyd
;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core_poll.pyd;
#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core_version.p
yd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\devices\monitor
edqueue.pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

danbe commented Jun 17, 2012

Here are the commands I used to make it run and their outputs.
Windows xp, Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)], zmq 2.2.0

Note that dependencywalker is missing ieshims.dll and wer.dll, but they don't seem to matter

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>dir

Directory of C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils

06/17/2012 09:06 AM

.
06/17/2012 09:06 AM ..
06/16/2012 02:39 PM 642 allocate.h
06/16/2012 02:39 PM 9,753 buffers.pxd
06/16/2012 02:39 PM 289 initthreads.py
06/16/2012 02:39 PM 618 initthreads.pyc
06/17/2012 09:02 AM 11,776 initthreads.pyd
06/16/2012 02:39 PM 2,407 jsonapi.py
06/16/2012 02:39 PM 2,492 jsonapi.pyc
06/12/2008 03:58 PM 739,376 mt.exe
06/16/2012 02:39 PM 1,324 pyversion_compat.h
06/16/2012 02:39 PM 286 rebuffer.py
06/16/2012 02:39 PM 609 rebuffer.pyc
06/17/2012 09:06 AM 25,600 rebuffer.pyd
06/16/2012 02:39 PM 980 strtypes.py
06/16/2012 02:39 PM 859 strtypes.pyc
06/16/2012 02:39 PM 3,514 zmq_compat.h
06/16/2012 02:39 PM 0 init.py
06/16/2012 02:39 PM 166 init.pyc

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:initthreads.pyd;#2

Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:rebuffer.pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>cd. .

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>
C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\constants.
pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\context.py
d;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\device.pyd
;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\error.pyd;
#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\message.py
d;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\stopwatch.
pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core\socket.pyd
;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core_poll.pyd;
#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\core_version.p
yd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

C:\Python27\Lib\site-packages\pyzmq-2.2.0-py2.7-win32.egg\zmq\utils>mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:..\devices\monitor
edqueue.pyd;#2
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.

@johndgiese

This comment has been minimized.

Show comment
Hide comment
@johndgiese

johndgiese Jun 20, 2012

I have been trying to get this to work for a few days now; I am having the exact same problems.

A pop-up says:

Runtime Error!
Program: C:\opt\vim\vim73\gvim.exe

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

I check the versions of python in vim, and it is correct. I also checked that the python_path is the same. I am trying to follow the instructions in here, but haven't gotten it to work yet.

I am on windows 64bit,
Python 2.7.3
newest version of vim (7.3. something)
IPython 0.12

I have been trying to get this to work for a few days now; I am having the exact same problems.

A pop-up says:

Runtime Error!
Program: C:\opt\vim\vim73\gvim.exe

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

I check the versions of python in vim, and it is correct. I also checked that the python_path is the same. I am trying to follow the instructions in here, but haven't gotten it to work yet.

I am on windows 64bit,
Python 2.7.3
newest version of vim (7.3. something)
IPython 0.12

@danbe

This comment has been minimized.

Show comment
Hide comment
@danbe

danbe Jun 21, 2012

I never got a popup, just an import error, pyzmq version not ok, import error, initthreads import error etc. Maybe you have a different error,
Did you run the dependencywalker on the dlls to see if anything is missing, and then try to fix the manifest with mt?
It works very nicely for me now.

danbe commented Jun 21, 2012

I never got a popup, just an import error, pyzmq version not ok, import error, initthreads import error etc. Maybe you have a different error,
Did you run the dependencywalker on the dlls to see if anything is missing, and then try to fix the manifest with mt?
It works very nicely for me now.

@quasarj

This comment has been minimized.

Show comment
Hide comment
@quasarj

quasarj Jun 21, 2012

I was getting the exact behavior johndgiese is seeing - with the popup error. Running mt as explained above on all of the pyd files fixed it for me. Note that some of my files didn't match the exact ones from the pydoc thread, i had to run it on ALL the pyd files in the pyzmq directory.

quasarj commented Jun 21, 2012

I was getting the exact behavior johndgiese is seeing - with the popup error. Running mt as explained above on all of the pyd files fixed it for me. Note that some of my files didn't match the exact ones from the pydoc thread, i had to run it on ALL the pyd files in the pyzmq directory.

@shelper

This comment has been minimized.

Show comment
Hide comment
@shelper

shelper Jul 26, 2012

after i run all the mt commands, the pop up window is still there with error R6034 and zmq import error in vim output when i put :IPython first time, but when i put second time, then it seems the vim is communicating with ipython but ipython does not fire output, say, i run :py run_command('a=1234') and there is nothing happend in ipython, but when i type print a in ipython console, the a is 1234.
run enviroment: python 2.7.2, ipython 0.12.1, any one has any idea?

shelper commented Jul 26, 2012

after i run all the mt commands, the pop up window is still there with error R6034 and zmq import error in vim output when i put :IPython first time, but when i put second time, then it seems the vim is communicating with ipython but ipython does not fire output, say, i run :py run_command('a=1234') and there is nothing happend in ipython, but when i type print a in ipython console, the a is 1234.
run enviroment: python 2.7.2, ipython 0.12.1, any one has any idea?

@johndgiese

This comment has been minimized.

Show comment
Hide comment
@johndgiese

johndgiese Jul 26, 2012

When you run a command in vim-ipython it sends the command to the ipython server; this is a separate process than the python that vim has internally for scripting; the namespaces are completely separate. Running :py commands will always run in vim's python process, while writing commands in the ipython console will send the command via zmq to the ipython process you started yourself, it will then execute the command, and send the output back to vim via zmq, at which point vim will update the vim-ipython prompt.

When you run a command in vim-ipython it sends the command to the ipython server; this is a separate process than the python that vim has internally for scripting; the namespaces are completely separate. Running :py commands will always run in vim's python process, while writing commands in the ipython console will send the command via zmq to the ipython process you started yourself, it will then execute the command, and send the output back to vim via zmq, at which point vim will update the vim-ipython prompt.

@shelper

This comment has been minimized.

Show comment
Hide comment
@shelper

shelper Jul 26, 2012

thanks for explaining, after reading your comments several times, i think i got some idea, so, here is the problem i encounter:
1 start ipython qtconsole
2. start gvim, open foo.py file (which only has lines: 'a= 1234; print a')
3 run :IPython in vim, window pop up giving runtime library loading error R6034,
4. run :IPython again in vim, no error shows up
5. press F5 in vim, the minibuffer shows:
In[1]: In[]: run -i 'Path\to\foo.py'
press enter or type command to continue
6. switch to ipython qtconsole,found no output, but type a, it prints 1234, which means a is there with value from foo.py

So, i know vim and ipython are talking to each other, but this is not so useful if i can not get output from ipython.. and also the error R 6034 shows the first time ? actually if i skip step 4 above, the phenomena is the same...
i just wonder if there is a solution to this...

thanks again!

P.S. in step 5, the number '1' in the 'In[1]' matches the prompt in ipython, that means if you run several command in ipython qtconsole, and then run a script in vim by F5, the number will change to current ipython input prompt number

shelper commented Jul 26, 2012

thanks for explaining, after reading your comments several times, i think i got some idea, so, here is the problem i encounter:
1 start ipython qtconsole
2. start gvim, open foo.py file (which only has lines: 'a= 1234; print a')
3 run :IPython in vim, window pop up giving runtime library loading error R6034,
4. run :IPython again in vim, no error shows up
5. press F5 in vim, the minibuffer shows:
In[1]: In[]: run -i 'Path\to\foo.py'
press enter or type command to continue
6. switch to ipython qtconsole,found no output, but type a, it prints 1234, which means a is there with value from foo.py

So, i know vim and ipython are talking to each other, but this is not so useful if i can not get output from ipython.. and also the error R 6034 shows the first time ? actually if i skip step 4 above, the phenomena is the same...
i just wonder if there is a solution to this...

thanks again!

P.S. in step 5, the number '1' in the 'In[1]' matches the prompt in ipython, that means if you run several command in ipython qtconsole, and then run a script in vim by F5, the number will change to current ipython input prompt number

@johndgiese

This comment has been minimized.

Show comment
Hide comment
@johndgiese

johndgiese Jul 26, 2012

This is a bit complicated, but basically there is an ipython kernel, and the console (and vim) are clients that talk to the kernel. Currently the output resulting from commands from one client (e.g. vim) are not displayed in other clients (the IPython kernel).

I actually have my own version of vim-ipython that I have heavily modified from ivanov's. If you want to give it a try you can. I am setting up a repository for you, in case you want to.

This is a bit complicated, but basically there is an ipython kernel, and the console (and vim) are clients that talk to the kernel. Currently the output resulting from commands from one client (e.g. vim) are not displayed in other clients (the IPython kernel).

I actually have my own version of vim-ipython that I have heavily modified from ivanov's. If you want to give it a try you can. I am setting up a repository for you, in case you want to.

@shelper

This comment has been minimized.

Show comment
Hide comment
@shelper

shelper Jul 26, 2012

i actually saw the same issue here: ipython/ipython#1873
did you really solve the problem? that would be nice and greatly appreciated if you can share your script,
i am working on windows 7 btw,
thx

shelper commented Jul 26, 2012

i actually saw the same issue here: ipython/ipython#1873
did you really solve the problem? that would be nice and greatly appreciated if you can share your script,
i am working on windows 7 btw,
thx

@johndgiese

This comment has been minimized.

Show comment
Hide comment
@johndgiese

johndgiese Jul 26, 2012

I created a repository here:
https://github.com/johndgiese/vipy/blob/master/README.md

On Thu, Jul 26, 2012 at 3:12 PM, shelper <
reply@reply.github.com

wrote:

i actually saw the same issue here:
ipython/ipython#1873
did you really solve the problem? that would be nice and greatly
appreciated if you can share your script,
i am working on windows 7 btw,
thx


Reply to this email directly or view it on GitHub:
#20 (comment)

I created a repository here:
https://github.com/johndgiese/vipy/blob/master/README.md

On Thu, Jul 26, 2012 at 3:12 PM, shelper <
reply@reply.github.com

wrote:

i actually saw the same issue here:
ipython/ipython#1873
did you really solve the problem? that would be nice and greatly
appreciated if you can share your script,
i am working on windows 7 btw,
thx


Reply to this email directly or view it on GitHub:
#20 (comment)

@shelper

This comment has been minimized.

Show comment
Hide comment
@shelper

shelper Jul 26, 2012

thanks alot!
will try it out

btw, according to ipython dev person
ipython 0.14 should fix the no-output issue. do you notice this when using
ipython 0.14?
i could not find a place to download this version..

shelper commented Jul 26, 2012

thanks alot!
will try it out

btw, according to ipython dev person
ipython 0.14 should fix the no-output issue. do you notice this when using
ipython 0.14?
i could not find a place to download this version..

@johndgiese

This comment has been minimized.

Show comment
Hide comment
@johndgiese

johndgiese Jul 27, 2012

I am not 100% sure, but I was using 0.14 and it didn't work for me either.
That being said I have made a lot of changes to the plugin, so I can not
say what the original vim-ipython would do.

On Thu, Jul 26, 2012 at 5:39 PM, shelper <
reply@reply.github.com

wrote:

thanks alot!
will try it out

btw, according to ipython dev person
ipython 0.14 should fix the no-output issue. do you notice this when using
ipython 0.14?
i could not find a place to download this version..


Reply to this email directly or view it on GitHub:
#20 (comment)

I am not 100% sure, but I was using 0.14 and it didn't work for me either.
That being said I have made a lot of changes to the plugin, so I can not
say what the original vim-ipython would do.

On Thu, Jul 26, 2012 at 5:39 PM, shelper <
reply@reply.github.com

wrote:

thanks alot!
will try it out

btw, according to ipython dev person
ipython 0.14 should fix the no-output issue. do you notice this when using
ipython 0.14?
i could not find a place to download this version..


Reply to this email directly or view it on GitHub:
#20 (comment)

@LeszekSwirski

This comment has been minimized.

Show comment
Hide comment
@LeszekSwirski

LeszekSwirski Oct 11, 2012

I still get the R6034 error, even after running the above mt script, but this time not on zmq but IPython itself, e.g. when running

:py import IPython

I still get the R6034 error, even after running the above mt script, but this time not on zmq but IPython itself, e.g. when running

:py import IPython
@LeszekSwirski

This comment has been minimized.

Show comment
Hide comment
@LeszekSwirski

LeszekSwirski Oct 16, 2012

Turns out I was having issues with import uuid. I've now fixed this by merging my python manifest into my vim/gvim's manifest, like so:

mt -inputresource:C:\windows\syswow64\python27.dll;#2 -out:%TEMP%\python.manifest
mt -inputresource:"C:\Program Files (x86)\vim\vim73\gvim.exe" -out:%TEMP%\gvim.manifest
mt -manifest %TEMP%\python.manifest %TEMP%\gvim.manifest -outputresource:"C:\Program Files (x86)\vim\vim73\gvim.exe"
mt -manifest %TEMP%\python.manifest -outputresource:"C:\Program Files (x86)\vim\vim73\vim.exe"

(The above is from memory, make sure to backup your vim/gvim first)

Turns out I was having issues with import uuid. I've now fixed this by merging my python manifest into my vim/gvim's manifest, like so:

mt -inputresource:C:\windows\syswow64\python27.dll;#2 -out:%TEMP%\python.manifest
mt -inputresource:"C:\Program Files (x86)\vim\vim73\gvim.exe" -out:%TEMP%\gvim.manifest
mt -manifest %TEMP%\python.manifest %TEMP%\gvim.manifest -outputresource:"C:\Program Files (x86)\vim\vim73\gvim.exe"
mt -manifest %TEMP%\python.manifest -outputresource:"C:\Program Files (x86)\vim\vim73\vim.exe"

(The above is from memory, make sure to backup your vim/gvim first)

@vakosel

This comment has been minimized.

Show comment
Hide comment
@vakosel

vakosel Dec 8, 2012

Hi all, i had exactly the same issues . My environment is win7 , python27 , pyzmq 2.2.0.1 , ipython 13.1 .Gvim 7.3.754 build with gcc 4.6.2 and python27

I resolved them following these steps after testing with Dep.Walker that there were errors with MSVCR90.DLL loading
when opened *.PYD and *.DLL (1) files from pyzmq foder.

  1. went to the folder pyzmq with VS command line tools 2012 x86 (my os) and searched for all pyd files.
  2. i went to every subfolder where these .pyd existed and executed:

mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:(XXX).pyd;#2
where (XXX) was every pyd (around 10) in every subfolder..The console didn't show any mistake in the procedure
3) i did the same with the .dll file AND VOILA!

Everything is working like charm! I must confess that DANBE'S POST above was the real key ...

I just wanted to post this in order to assure that this works.. 👍

vakosel commented Dec 8, 2012

Hi all, i had exactly the same issues . My environment is win7 , python27 , pyzmq 2.2.0.1 , ipython 13.1 .Gvim 7.3.754 build with gcc 4.6.2 and python27

I resolved them following these steps after testing with Dep.Walker that there were errors with MSVCR90.DLL loading
when opened *.PYD and *.DLL (1) files from pyzmq foder.

  1. went to the folder pyzmq with VS command line tools 2012 x86 (my os) and searched for all pyd files.
  2. i went to every subfolder where these .pyd existed and executed:

mt.exe -inputresource:c:\windows\system32\python27.dll;#2 -outputresource:(XXX).pyd;#2
where (XXX) was every pyd (around 10) in every subfolder..The console didn't show any mistake in the procedure
3) i did the same with the .dll file AND VOILA!

Everything is working like charm! I must confess that DANBE'S POST above was the real key ...

I just wanted to post this in order to assure that this works.. 👍

@ivanov

This comment has been minimized.

Show comment
Hide comment
@ivanov

ivanov Mar 26, 2013

Owner

closing this issue

Owner

ivanov commented Mar 26, 2013

closing this issue

@accuya

This comment has been minimized.

Show comment
Hide comment
@accuya

accuya Apr 27, 2014

I came across this problem yesterday. XP + python27 + vim7.3 (+python)
I fixed it by executing mt.exe -inputresource:"d:\Python27\python.exe" -outputresource:"d:\Program Files\Vim\vim73\gvim.exe"
This command actually replaced the manifest embedded in gvim.exe with the one in python.exe.
But it DO fix the R6034 error when executing IPython command in gvim.
Hope this helps.

accuya commented Apr 27, 2014

I came across this problem yesterday. XP + python27 + vim7.3 (+python)
I fixed it by executing mt.exe -inputresource:"d:\Python27\python.exe" -outputresource:"d:\Program Files\Vim\vim73\gvim.exe"
This command actually replaced the manifest embedded in gvim.exe with the one in python.exe.
But it DO fix the R6034 error when executing IPython command in gvim.
Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment