Menu

64-bit compatibility

Kimmy
2013-12-27
2014-06-03
  • Kimmy

    Kimmy - 2013-12-27

    Dear ExcelPython General Discussion,

    I have three computers. All are running Windows 7. The first computer is running Windows 7 32-bit with 32-bit Office 2010. The second computer is running Windows 7 64-bit with 64-bit Office 2010. The third computer is running Windows 7 64-bit with Office 2013 64-bit installed.

    Both of the 64-bit computers cannot get the ExcelPython "reference" to work. However, the 32-bit computer works just fine and on the 1st try. The command I'm testing with is ?PyStr(PyEval("1+2")). I get 3 as output on the 32-bit machine. On both 64-bit machines I get a popup that says, "File not found: ExcelPython27.dll." I am very sad.

    I have tried the 64-bit version of Python 2.7.6 and the 32-bit version of Python 2.7.6 on the 64-bit computer with Office 2013 (64-bit); those did not work. I have tried copying the ExcelPython27.dll and the Python27.dll (32-bit) to the "C:\Program Files\Microsoft Office\Office15" directory; that did not work.

    I have tried copying the ExcelPython27.dll to the "C:\Program Files\Microsoft Office\Office14" on the other 64-bit computer; that did not work.

    Does ExcelPython work for 64-bit Office? Should I just stop trying? Any information would be a great help.

    Thank you,
    Mad Tom Vane

     
    • Eric Reynolds

      Eric Reynolds - 2013-12-28

      Hi Mad Tom,

      in principle it does work, but you would need to compile a 64-bit version of ExcelPython from source in order to use it in 64-bit Excel. I have been meaning to do this and make the 64-bit binaries available on Sourceforge but I haven't got round to it yet, I'll try to do it next week.

      Thanks very much for your interest in my project, I'll notify you when the 64-bit binaries are up!

      Regards,
      Eric

       

      Last edit: Eric Reynolds 2013-12-30
      • Kimmy

        Kimmy - 2013-12-30

        Thanks for the reply. I have an end user that would be happy to get the 64-bit version working on their computer. Would the 64-bit version require Python 64-bit or 32-bit? Again, thank you for such a fast response.

         
        • Eric Reynolds

          Eric Reynolds - 2013-12-30

          Yes, in general 32- and 64-bit binaries cannot coexist within the same process (to my knowledge), so Excel, ExcelPython and Python need to be either all 64-bit or all 32-bit. This is because ExcelPython does everything in the Excel process - the alternative would be to have a separate process as a Python server which which Excel communicates, in which case you could mix and match (some other Excel/Python interfaces work this way I believe).

          I will get the binaries up when I can, please DO bug me repeatedly as I might forget.

           
          • Kimmy

            Kimmy - 2013-12-31

            Happy New Year!

            Just wondering how the 64-bit binaries are coming along.

            Do you have any resolutions for 2014?

            My resolution is 1920x1080.

             
            • Eric Reynolds

              Eric Reynolds - 2014-01-01

              Oh my what a terrible pun
              Mine is to compile for 64bits
              Happy new year!

               
  • David Williamson

    Hey,

    I am also interested in the 64-bit version. Is there any update on this?

     
    • Eric Reynolds

      Eric Reynolds - 2014-01-08

      Hi David,
      I don't know if you get e-mails for posts on the general thread, I replied to you.
      Regards,
      Eric.

       
  • Eric Reynolds

    Eric Reynolds - 2014-01-03

    Hi Mad Tom, David,

    so I had a go today at compiling the 64-bit DLL. I have no way of testing it unfortunately as I don't have a 64-bit machine, however if you could oblige that would be great.

    I haven't packaged it up yet in an installer, but if you install the 32-bit version then place the attached 64-bit version of ExcelPython.dll in C:\Windows\System32 (not in C:\Windows\SysWOW64 which, confusingly, is where 32-bit DLLs are placed), it will hopefully work.

    This is the first time I've compiled anything for 64-bit, and like I said, I'm doing everything blind with no 64-bit machine, so your help is very much appreciated.

    Obviously this will only work with Python 2.7.x.

    Please let me know,

    Many thanks,

    Eric.

     
    • Kimmy

      Kimmy - 2014-01-03

      Cool.

      I'm leaving early today, and I go catatonic during the weekends (it's hereditary). I'll start testing on Monday.

      Thank you.

       

      Last edit: Kimmy 2014-01-03
      • Eric Reynolds

        Eric Reynolds - 2014-01-08

        Hi Tom,
        did you manage to try it out?
        Please let me know!
        Regards,
        Eric.

         
  • Kimmy

    Kimmy - 2014-01-10

    Hello,

    Yes, it did work for me. I had Python 2.7.6 (64-bit) installed. I had the ExcelPython1.0.0 installed. I downloaded the 64-bit dll you gave me and placed it in C:\Windows\System32. I proceeded to open Excel 2013 (64-bit) and pressed Alt+F11. Next, I went to Tools -> References and added ExcelPython27. Finally, I pressed Ctrl+G and typed ?PyStr(PyEval("1+2")) in the box and pressed enter. It worked.

     
  • Eric Reynolds

    Eric Reynolds - 2014-01-10

    Fantastic news. For an extra check, you can try**

    ?PyStr(PyEval("sys.version", PyDict("sys", PyModule("sys"))))
    

    but I'm sure it's loading the 64-bit version.

    Within the next few days I'll upload a 64-bit installer.

    Regards and thanks again for your help,

    Eric.

    ** The command is a little bit unwieldy because you can't import sys within an expression

     

    Last edit: Eric Reynolds 2014-01-10
    • Kimmy

      Kimmy - 2014-01-10

      That command worked too.

       
  • Eric Reynolds

    Eric Reynolds - 2014-01-17

    Tom,
    FYI I've uploaded a 64-bit installer.
    Regards,
    Eric.

     
  • Mooniac

    Mooniac - 2014-04-23

    Ok, that's helpful. I have 64-bit windows, 64-bit Anaconda, and 32-bit excel. It sounds like I should dump Anaconda and move to the 32-bit version then use 32-bit ExcelPython since 64-bit Excel isn't easily available.

    Is there another solution allowing me to work with 64-bit Anaconda & 32-bit Excel?

     
    • Eric Reynolds

      Eric Reynolds - 2014-04-24

      I am afraid I don't have a solution for you. 64-bit and 32-bit code cannot
      exist in the same process so the only way for 64-bit python and 32-bit
      excel to co-exist is for them to have two separate processes and interact
      via remote procedure calls over TCP. I believe this is how some
      alternatives to ExcelPython, like xlloop, are structured. Or, actually,
      what you could look into is hosting a COM server from Python and calling it
      from VBA.

      If you really want to use ExcelPython in this way, you need ExcelPython to
      load up 32-bit python, which could then communicate with a 64-bit python
      server using something like the interprocess module. But it's horribly
      complicated, I wouldn't recommend it.

      Maybe in future I or someone else could look into extending ExcelPython to
      support remotely hosted processes.

       
  • GPA

    GPA - 2014-06-02

    Hi, is it possible that the 64-bit installer isn't actually installing the 64-bit dll?
    J've tried several time, but it ends up to copy the ExcelPython27.dll in the SysWOW64 folder.
    I've manually in the system32 folder the dll attached in this discussion and it worked well, but as I need to share my code with other, would be easier if they have just to run the 64-bit installer.
    Thanks

     
    • Eric Reynolds

      Eric Reynolds - 2014-06-02

      Ok I must have made a mistake in the installer I will check tomorrow
      morning.

       
    • Eric Reynolds

      Eric Reynolds - 2014-06-03

      Hi, there was indeed a mistake, it needed an extra setting

      ArchitecturesInstallIn64BitMode=x64

      in the file setup.excel64.iss.

      The new releases on GitHub will contain this bug fix, in the mean time I have recompiled the installer and attached it, let me know if it works OK now!

      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.