Wednesday, July 6, 2011

Re: Python plugin using PyWin32

On Tuesday, July 05, 2011 11:49:30 AM, Roland Puntaier wrote:
> On 07/04/2011 07:47 PM, Alexandre Martani wrote:
>> On 7/2/2011 6:45 AM, Roland Puntaier wrote:
>>> On 06/30/2011 04:35 PM, Alexandre Martani wrote:
>>>> I am trying to use Vim R plugin [1], which is a Python plugin that
>>>> uses PyWin32 on Windows. I have installed Python 2.7.1 and PyWin32.
>>>> It is installed correctly, as I am able to do a "import win32api"
>>>> from python shell without errors. But, on GVim, if I do:
>>>>
>>>> :python import win32api
>>>>
>>>> I receive the following error:
>>>>
>>>> Traceback (most recent call last):
>>>> File "<string>", line 1, in <module>
>>>> ImportError: DLL load failed: The specified module could not be found.
>>>
>>> Is the directory where the Win32API DLLs are in the Windows
>>> environment variable PATH?
>>> If not, please try to add it there and restart VIM. Do the same also
>>> for the R DLLs.
>>> By the way: I wasn't aware of this VIM R plugin. I like R-P
roject and
>>> VIM. So this is a good fit.
>>>
>>> Regards, Roland
>>>
>>
>> The module works when used directly from the Python shell (only fails
>> from Gvim). I have checked os.environ["PATH"] from both instances, and
>> they are basically equal (they both includes "C:\Python2.7"), so I
>> think this is not the problem. Is there any other paths Windows uses
>> to search its DLLs?
>>
>> Alexandre
>>
> Maybe this helps:
> http://stackoverflow.com/questions/214852/python-module-dlls
>
> Regards, Roland

I tried to add a lot of paths, but I am still getting this error.

:python print "\n".join(os.environ["PATH"].split(";"))

C:\Python27\
C:\Python27\Scripts
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\system32\WindowsPowerShell\v1.0
C:\Python27
C:\Program Files\TortoiseSVN\bin
%APPDATA%\Python\Scripts
C:\Program Files\Vim\vim73
C:\Python27\Lib\site-packages\win32
C:\Python27\Lib\site-packages\win32\lib
C:\Python27\Lib\site-packages\pywin32_system32

C:\Python27\Lib\site-packages\win32
C:\Python27\Lib\site-packages

Any other idea of paths which could be missing?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment