Menu

Error: Can't find project or library

Mooniac
2013-11-10
2013-11-28
  • Mooniac

    Mooniac - 2013-11-10

    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?

     
    • Eric Reynolds

      Eric Reynolds - 2013-11-10

      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
    • Eric Reynolds

      Eric Reynolds - 2013-11-10

      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
      • bearuo

        bearuo - 2013-11-11

        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

         
        • Eric Reynolds

          Eric Reynolds - 2013-11-11

          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
          • bearuo

            bearuo - 2013-11-12

            depends.exe reported the following DLLs to be missing:

            API-MS-WIN-CORE-COM-L1-1-0.DLL
            API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
            API-MS-WIN-CORE-WINRT-L1-1-0.DLL
            API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
            API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
            API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL 
            DCOMP.DLL
            GPSVC.DLL
            IESHIMS.DLL
            

            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?

             
            • Eric Reynolds

              Eric Reynolds - 2013-11-12

              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
  • bearuo

    bearuo - 2013-11-14

    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?

     
  • Eric Reynolds

    Eric Reynolds - 2013-11-14

    Is the version of Python you are running 64 bits? That could be the source of the problem.

     
  • bearuo

    bearuo - 2013-11-14

    I am running 32 bit Python with 32 bit Excel in 64 bit Windows.

     
  • Eric Reynolds

    Eric Reynolds - 2013-11-14

    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 .

     
  • bearuo

    bearuo - 2013-11-14

    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.

     
  • bearuo

    bearuo - 2013-11-15

    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?

     
  • bearuo

    bearuo - 2013-11-16

    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.

     
  • Eric Reynolds

    Eric Reynolds - 2013-11-28

    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

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.