Exactly what I was looking for but throws an error when ?PyEval("1+2") is entered in the immediate window. Checking I find that ExcelPython27 is properly checked in my references and I am using Python 2.7 (Anaconda variant). Could this be the source of my problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry didn't see ur message subject, if that's what you're seeing probably it's because it can't find Python27.dll maybe because it's not on the system path or the anaconda version is incompatible (you can use depends.exe on ExcelPython27.dll to ascertain if this is what's happening).
If this is indeed the cause of the problem ExcelPython will have to be rebuilt against the anaconda libraries in order to work.
Last edit: Eric Reynolds 2013-11-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having the same problem of error: File not found: ExcelPython27.dll after entering ?PyStr(PyEval("1+2")). I can locate ExcelPython27.dll in c:\Windows\SysWOW64 which is in PATH.
Also using Anaconda Python27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe Excel gives that message even when it can find the dll but can't find a dll it depends on. There is a free tool called depends.exe that can help you analyse if this is what's happening.
Last edit: Eric Reynolds 2013-11-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These are exactly the same reported at http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems, the solution of which supposedly had nothing to do with these DLLS, but rather mis-registration of OCX files. Could this be specific to systems running 32 bit Excel in 64 bit Win7?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had to uninstall the newer version of the VC2010 redistributable on my machine, to allow installation of the x86 VC2010 redistribution you had linked to above. However, the same error persists. Do you have those DLLs listed above on your machine?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok so I am running 32-bit Windows, Python and Excel.
When I open ExcelPython27.dll I don't have that list of missing dependencies, the only ones missing are IESHIMS.DLL and WER.DLL but in my experience those are always missing. When I rename my Python27.dll file and open ExcelPython27.dll, the missing dependency is detected, so clearly on your PC it's finding Python27.dll, so that's not the problem (I thought perhaps it was delay-loaded dependency).
I'm afraid I don't know where the issue is. Unfortunately Excel's message is of no help at all.
Eric, I have been getting and responding to your emails, but they keep bouncing back as undeliverable. Appreciate your offer to help very much. BTW, do you run into these problems when with Solver or Analysis Toolpack open?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried ExcelPython in another Win64 machine with 32bit Excel and it works perfectly. So the earlier problems with Solver/Analysis Toolpack could be specific to the installation history of that system.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been playing around with Anaconda myself recently and I was encountering similar problems.
I finally fixed them when I noticed that when I entered
where python27.dll
at the command line it wasn't giving me the path to the Anaconda version first! I think this creates problems in terms of the paths where the Python looks for its libraries. It's not an issue when you run python.exe, because it will load the python27.dll in the same folder.
This unfortunately is just a feature of how Windows manages DLL loading, I believe it has created many headaches for many people over the history of Windows!
Hope this helps!
Regards
Eric.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Exactly what I was looking for but throws an error when ?PyEval("1+2") is entered in the immediate window. Checking I find that ExcelPython27 is properly checked in my references and I am using Python 2.7 (Anaconda variant). Could this be the source of my problem?
Try ?PyStr(PyEval("1+2"))
If that doesnt work then there is some problem that I would be very happy to debug with you as soon as I have access to a pc (on tuesday)
Last edit: Eric Reynolds 2013-11-13
Sorry didn't see ur message subject, if that's what you're seeing probably it's because it can't find Python27.dll maybe because it's not on the system path or the anaconda version is incompatible (you can use depends.exe on ExcelPython27.dll to ascertain if this is what's happening).
If this is indeed the cause of the problem ExcelPython will have to be rebuilt against the anaconda libraries in order to work.
Last edit: Eric Reynolds 2013-11-13
I am having the same problem of error: File not found: ExcelPython27.dll after entering ?PyStr(PyEval("1+2")). I can locate ExcelPython27.dll in c:\Windows\SysWOW64 which is in PATH.
Also using Anaconda Python27
I believe Excel gives that message even when it can find the dll but can't find a dll it depends on. There is a free tool called depends.exe that can help you analyse if this is what's happening.
Last edit: Eric Reynolds 2013-11-13
depends.exe reported the following DLLs to be missing:
These are exactly the same reported at http://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems, the solution of which supposedly had nothing to do with these DLLS, but rather mis-registration of OCX files. Could this be specific to systems running 32 bit Excel in 64 bit Win7?
Have you tried installing the x86 VC 2010 redistributable package?
http://www.microsoft.com/en-us/download/details.aspx?id=5555
Last edit: Eric Reynolds 2013-11-13
I had to uninstall the newer version of the VC2010 redistributable on my machine, to allow installation of the x86 VC2010 redistribution you had linked to above. However, the same error persists. Do you have those DLLs listed above on your machine?
Is the version of Python you are running 64 bits? That could be the source of the problem.
I am running 32 bit Python with 32 bit Excel in 64 bit Windows.
Ok so I am running 32-bit Windows, Python and Excel.
When I open ExcelPython27.dll I don't have that list of missing dependencies, the only ones missing are IESHIMS.DLL and WER.DLL but in my experience those are always missing. When I rename my Python27.dll file and open ExcelPython27.dll, the missing dependency is detected, so clearly on your PC it's finding Python27.dll, so that's not the problem (I thought perhaps it was delay-loaded dependency).
I'm afraid I don't know where the issue is. Unfortunately Excel's message is of no help at all.
To get more info about what DLLs Excel is looking for you could try monitoring it iwht SysInternals Process Monitor like they do here http://social.technet.microsoft.com/Forums/office/en-US/a722fe5b-aef3-4e1b-84a0-7dbb6515415b/problem-with-solver-dll-load-and-excel-2010 .
Eric, the following suggests that the problem has to do with relative paths perhaps:
If I remove all of my other Excel add-ins, ?PyStr(PyEval("1+2")) works!
If I add Analysis Toolpack and its VBA, ?PyStr(PyEval("1+2")) works EVERY OTHER TIME it is entered!
If I further add Solver, ?PyStr(PyEval("1+2")) no longer works.
Eric, I have been getting and responding to your emails, but they keep bouncing back as undeliverable. Appreciate your offer to help very much. BTW, do you run into these problems when with Solver or Analysis Toolpack open?
I tried ExcelPython in another Win64 machine with 32bit Excel and it works perfectly. So the earlier problems with Solver/Analysis Toolpack could be specific to the installation history of that system.
Hi bearuo, mooniac
I have been playing around with Anaconda myself recently and I was encountering similar problems.
I finally fixed them when I noticed that when I entered
at the command line it wasn't giving me the path to the Anaconda version first! I think this creates problems in terms of the paths where the Python looks for its libraries. It's not an issue when you run
python.exe
, because it will load thepython27.dll
in the same folder.This unfortunately is just a feature of how Windows manages DLL loading, I believe it has created many headaches for many people over the history of Windows!
Hope this helps!
Regards
Eric.