-
Notifications
You must be signed in to change notification settings - Fork 748
Unable to embed python in C# application on Ubuntu 16.04: System.EntryPointNotFoundException: Py_IsInitialized #740
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
In what I believe must be a related issue of path configurations, if I build and install pythonnet as above, embedding C# within python works. However, when I attempt to embed python within a C# application:
I get the following error:
I believe this again must be a path problem related to using a conda python installation, but the solution suggested in this issue #489 did not do the trick for me. |
@mikeoconnor0308 have you tried cpython instead of anaconda? There are other problems with conda/anaconda on linux such as this one: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/z7RboI3Pir8 Also related issues: |
@mikeoconnor0308 just change the title of this issue and update the headline. can you document which suggestions you tried? |
@mikeoconnor0308 did you try this? |
@denfromufa I have tried the symbolic link suggestion proposed here: #303 (comment)
and the LD_PRELOAD method suggested here: #489 (comment)
finally, i have now tried #245 (comment)
None of these tricks resulted in any notable changes, for either the default python3 installed with apt-get, or an anaconda installation. My guess is that during compilation it has not correctly set the libpython library name, or another dependent path is missing? But I do not know how to diagnose it.
If we compare that to embedding the CLR in python, (attached as python_clr.log) everything is fine:
|
@dmitriyse probably understands this more |
The problem with the Anaconda Python distribution is that it builds the |
This is not relevant anymore. |
Environment
Details
Based on the issue #470, I am attempting to compile pythonnet from source.
I have installed clang and glib2-dev as advised on the wiki, and build as indicated below.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
As a workaround, I added
'-L/usr/lib/x86_64-linux-gnu/'
and'-L/usr/lib/gcc/x86_64-linux-gnu/5'
to the setup.pyextra_link_args
field, after which it builds successfully. Manually editing setup.py does not seem like the advised strategy, can anyone advise on a better solution?Cheers,
The text was updated successfully, but these errors were encountered: