-
Notifications
You must be signed in to change notification settings - Fork 102
Handle statically linked case in macOS as well #212
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
It turned out macOS can have statically linked Python when it's installed via conda: JuliaPy#150 (comment) So it seems `linked_libpython` (which calls `libdl`) is the only way to reliably detect if the Python executable is statically linked or not. Since cd2e408 implements it for Windows as well, we can now rely on `linked_libpython` everywhere which simplifies core.py.
Pull Request Test Coverage Report for Build 511
💛 - Coveralls |
Pull Request Test Coverage Report for Build 516
💛 - Coveralls |
I have just tried this PR branch but I am getting exactly the same error. It does not change if I delete the EDIT: I was doing something stupid! It works now 👍 Thanks a lot! |
@bstellato Thanks for trying it out! With this PR, I expect that:
where Do you see this behavior? |
This is so weird... it now works for me in both cases! I am using conda, python 3.6 and mac os.
I have seen that within my package updates I ended up installing python from conda-forge. If I run
Could this be the reason? This solves the problem #185 as well on the linux cluster I am working with. |
@bstellato It would be nice if you can confirm that conda create --prefix testpyjulia defaults::python
testpyjulia/bin/pip install 'https://github.com/tkf/pyjulia/archive/macos-conda.zip#egg=julia'
testpyjulia/bin/python -c "import julia.Main" (or maybe with the old
Yes, we should be CIing with conda but conda can't be used with |
I ran the following commands:
I get this error though:
|
Thanks a lot! But this is not the expected exception... Could you try |
Since `if determine_if_statically_linked()` block was removed, we need additional check for statically linked executable. Furthermore, using `find_libpython()` here was not appropriate since `py_libpython` should be the libpython _used_ by the current executable.
Since `normalize_path(None)` is `None`, we don't need the explicit block `if jlinfo.libpython is None`.
698e05b
to
3c2eee8
Compare
No-capturing mode -s is useful for remote debugging especially in case libjulia initialization fails. But it makes reading output almost impossible. Let's use -v instead since it provides what test is being executed in a more readable format.
It turned out macOS can have statically linked Python when it's installed via conda: #150 (comment)
So it seems
linked_libpython
(which callslibdl
) is the only way to reliably detect if the Python executable is statically linked or not. Since cd2e408 implements it for Windows as well, we can simplify core.py a lot by relying onlinked_libpython
.closes #150