-
Notifications
You must be signed in to change notification settings - Fork 750
Embedding test failed #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
When you built pythonnet from VS, did you install it to site-packages? What exception and traceback do you get? |
here is troubleshooting FAQ page to start with: https://github.com/denfromufa/pythonnet/wiki/Troubleshooting-FAQ |
Hi denfromufa, I followed your FAQ steps. I piped pythonnet and I can see this subfolder under \site-packages, which also contains clr.pyd and python.runtime.dll. Then I tried three winforms in \pythonnet-develop\demo all went through successfully. I have to copy Python.Test.dll to pythonnet-develop\src\tests in order to run python pythonnet\src\tests\runtests.py. There are four failures in MethodTest, complaining no method matches given arguments. But I believe other tests went through. Now it comes to the part I'm most interested. The console project still doesn't work. It exits on PythonEngine.Initialize() call with no error message. Just jumps out. Do you have suggestions on how to proceed? Thanks. |
By console app, I assume you mean nPython.exe? try starting it up from command line (cmd or ps) and see if you get exception and traceback with debug build of console app? I do not have windows 10 machine ready to confirm your problem. also might worth running embedding tests, which I updated in FAQ troubleshooting. 4 failing tests in MethodTest is not normal. BTW, you do not have to use nPython for pythonnet. You can |
Sounds like Python's not able to find where the python packages are Depending on how python's installed it might not find the python install See https://docs.python.org/2/using/cmdline.html (towards the end, at the regards,
|
@tonyroberts @letianzj there are 2 issues with python 2.7.11 windows installer from python.org, looks like others are hitting this issue also. I spent few hours debugging this until upgrading to anaconda. http://stackoverflow.com/questions/36603052/pythonengine-initialize-fails-without-any-error-message |
closing this issue, since python 2.7.12 was released with fixes to embedding paths. |
Hi, the code doesn't run on my machine, anyone happens to have a clue? really appreciated.
It's PythonEngine.Initialize() failed on Py_Initialize() call, exit code 1 with no further error message. I checked python27.dll is in c:\windows\system32.
The machine is windows 10, python 2.7.11 64bit, visual studio 2015 community. I'm trying to run the embedding test, calling python from C#. VS configuration is switched to DebugWin x64.
The text was updated successfully, but these errors were encountered: