excelpython icon indicating copy to clipboard operation
excelpython copied to clipboard

"Python process exited before it was possible to create the interface object. ....

Open patrickcourtot opened this issue 10 years ago • 13 comments

Hi This excel is working fine on my Laptop but do not work on my desktop Anaconda, Python, Excel an,d python script are exactly on the same location as on the laptop

Xlwing is OK but the functions are not working. I get this error message "Python process exited before it was possible to create the interface object. Command: pythonw.exe -c ""import sys;sys.path.append(r'D:\SkyDrive\APP\VDI\Project Journal');import xlwings.server; xlwings.server.serve('{4c3ae7ba-2be9-4782-a377-f13934ffc4a9}')"" Working Dir: "

Any idea N

patrickcourtot avatar Jun 03 '15 10:06 patrickcourtot

Are you using the functions via xlwings or did you set them up the ExcelPython way?

fzumstein avatar Jun 03 '15 18:06 fzumstein

The ExcelPython way

Le mercredi 3 juin 2015, Felix Zumstein [email protected] a écrit :

Are you using the functions via xlwings or did you set them up the ExcelPython way?

— Reply to this email directly or view it on GitHub https://github.com/ericremoreynolds/excelpython/issues/52#issuecomment-108574406 .

Best regards / Cordialement Patrick COURTOT Mobile : +33 6 89 22 67 97

patrickcourtot avatar Jun 03 '15 21:06 patrickcourtot

Then this coud be a conflict of the two libraries (the error msg comes from xlwings). In your spreadsheet, do you have both the xlpython and xlwings VBA modules?

fzumstein avatar Jun 03 '15 21:06 fzumstein

Hi Felix

On both machines (Laptop and desktop)

I have in VBA xlpython xlpython_udf

and xlpython.xlam ExcelPython

But in one the excel file where the functions are not working only on the desktop PC (even doublesum is not working) This Excel file is copied from the laptop to the desktop, so exactly the same.

This morning I tested again tto setup ExcelPythonon the problematic excel file setup ExcelPython -> OK Import Python UDFs ->* Execution error '53' File not found xlpython32-2.0.8.dll* but the file is in : C:\Users\Patrick\AppData\Roaming\Microsoft\Excel\XLSTART\xlpython

On my test Excel DoubleSum is working on both machines laptop & desktop and setup ExcelPython -> OK Import Python UDFs -> OK

On both machines xlwings is wotking fine

BR Patrick

Best regards / Cordialement Patrick COURTOT Mobile : +33 6 89 22 67 97

On 3 June 2015 at 23:13, Felix Zumstein [email protected] wrote:

Then this coud be a conflict of the two libraries (the error msg comes from xlwings). In your spreadsheet, do you have both the xlpython and xlwings VBA modules?

— Reply to this email directly or view it on GitHub https://github.com/ericremoreynolds/excelpython/issues/52#issuecomment-108617637 .

patrickcourtot avatar Jun 04 '15 06:06 patrickcourtot

Hi, I have similar questions here when I used excelpython add in. When I click "import Python UDSFs", it shows "Python process exited before it was possible to create the interface object...." When I checked myl log file, it showed "Exception: Cannot import PyWin32. Are you sure it's installed?" However, I used Anaconda Spyder, when I type "import _win32sysloader" in console, it does not show error message. I am not sure what happened here...

jiangfengpinglan91 avatar Nov 24 '15 15:11 jiangfengpinglan91

What happens if you run Python from Start > Run > "python" ?

Can you still import _win32sysloader?

ericremoreynolds avatar Nov 24 '15 15:11 ericremoreynolds

I am new to python. Can you explain a little by "run Python from Start->Run->"python""? Do you still mean I run python from Anaconda Spyder or run Python from other place? Thanks a lot.

jiangfengpinglan91 avatar Nov 24 '15 15:11 jiangfengpinglan91

No worries.

Actually the best thing is if you open a command prompt then once you have done that, type python and press Enter.

image

ericremoreynolds avatar Nov 24 '15 15:11 ericremoreynolds

Thanks. I did the following and here is what I find: image I have thought that Anaconda has installed it for me, because I typed "import _win32sysloader" in Anaconda Spyder, it did not show error message...

jiangfengpinglan91 avatar Nov 24 '15 15:11 jiangfengpinglan91

By default, ExcelPython launches whatever Python installation it finds on the system path. On your machine this is not the Anaconda installation (your screenshot shows that it's standard Python v2.7.10) otherwise it would say "Continuum Analytics".

You need to make Anaconda the default system Python installation. I am not sure what the quickest way of doing this on your machine is. One way to do it could be to rerun the Anaconda installer making sure you select the "make anaconda my default Python" option in the relevant install step.

ericremoreynolds avatar Nov 24 '15 15:11 ericremoreynolds

Thanks a lot. I rerun my Anaconda. Now it is the picture before installation step. If I select the second item "register Anaconda as system Python 2.7". Does it mean that I choose Anaconda as my default Python distribution? image

jiangfengpinglan91 avatar Nov 24 '15 16:11 jiangfengpinglan91

Yes leave those two selected.

ericremoreynolds avatar Nov 24 '15 16:11 ericremoreynolds

I had a same issue and I fixed it by below.

"Python process exited before it was possible to create the interface object. Command: pythonw.exe -c ""import sys;sys.path.append(r'D:\SkyDrive\APP\VDI\Project Journal');import xlwings.server; xlwings.server.serve('{4c3ae7ba-2be9-4782-a377-f13934ffc4a9}')"" Working Dir: "

from this error message, try to run those codes line by line.

import sys sys.path.append(r'D:\SkyDrive\APP\VDI\Project Journal') import xlwings.server xlwings.server.serve('{4c3ae7ba-2be9-4782-a377-f13934ffc4a9}')

then the xlwings server will re-run and your code will work. Thanks.

davidkim0523 avatar Oct 26 '20 07:10 davidkim0523