I installed excelpython, but when I go the VBA window and type in a PyString expression, it claims that it cannot find python27.dll. I am not very wise in the ways of windows, but is there anything special I am supposed to do to get this to work? My python is the anaconda distribution python 2.7.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I myself use Anaconda Python, in theory it should require no special setup, in practice what happens is that sometimes the system path is screwed up and ExcelPython loads the wrong python27.dll. This has been encountered before.
From a command line (Run > cmd.exe) try running where python27.dll (on some older versions of Windows you'll have to download the attached script file which simulates the where command). If your system is correctly configured the first result will be C:\Anaconda\python27.dll, or wherever Anaconda is installed. Otherwise you'll need to edit your PATH environment variable so that C:\Anaconda appears before any other folders where python27.dll may be located.
First, thanks for the prompt response! Second, "where" shows the right location for python27.dll, but it seems (this is just conjecture) that Excel looks in the SYSTEM, not the user path. Adding the location to the system path eliminates the previous error, but now can't find ExcelPython27.dll (in the references windows it does see the .tlb, whatever that is). Any further thoughts?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, thanks for the prompt response! Second, "where" shows the right location for python27.dll, but it seems (this is just conjecture) that Excel looks in the SYSTEM, not the user path. Adding the location to the system path eliminates the previous error, but now can't find ExcelPython27.dll (in the references windows it does see the .tlb, whatever that is). Any further thoughts?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually you know what Igor, could you send me a screenshot of the first error you got, because actually complaining it can't find Python27.dll is strange.
Excel sometimes says it "can't find" a DLL when in reality it can't find one of the DLLs it depends on. Please use the attached utility on ExcelPython27.dll (which should be in C:\Windows\System32 or C:\Windows\SysWOW64) to see what dependencies it's potentially not finding.
I installed excelpython, but when I go the VBA window and type in a PyString expression, it claims that it cannot find python27.dll. I am not very wise in the ways of windows, but is there anything special I am supposed to do to get this to work? My python is the anaconda distribution python 2.7.
I myself use Anaconda Python, in theory it should require no special setup, in practice what happens is that sometimes the system path is screwed up and ExcelPython loads the wrong
python27.dll
. This has been encountered before.From a command line (Run >
cmd.exe
) try runningwhere python27.dll
(on some older versions of Windows you'll have to download the attached script file which simulates thewhere
command). If your system is correctly configured the first result will beC:\Anaconda\python27.dll
, or wherever Anaconda is installed. Otherwise you'll need to edit yourPATH
environment variable so thatC:\Anaconda
appears before any other folders wherepython27.dll
may be located.Let me know if this solves the issue.
Regards,
Eric.
Last edit: Eric Reynolds 2014-02-10
Hi Eric,
First, thanks for the prompt response! Second, "where" shows the right location for python27.dll, but it seems (this is just conjecture) that Excel looks in the SYSTEM, not the user path. Adding the location to the system path eliminates the previous error, but now can't find ExcelPython27.dll (in the references windows it does see the .tlb, whatever that is). Any further thoughts?
Hi Eric,
First, thanks for the prompt response! Second, "where" shows the right location for python27.dll, but it seems (this is just conjecture) that Excel looks in the SYSTEM, not the user path. Adding the location to the system path eliminates the previous error, but now can't find ExcelPython27.dll (in the references windows it does see the .tlb, whatever that is). Any further thoughts?
Actually you know what Igor, could you send me a screenshot of the first error you got, because actually complaining it can't find Python27.dll is strange.
Excel sometimes says it "can't find" a DLL when in reality it can't find one of the DLLs it depends on. Please use the attached utility on ExcelPython27.dll (which should be in
C:\Windows\System32
orC:\Windows\SysWOW64
) to see what dependencies it's potentially not finding.