-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fail with a helpful message if separate cache is not supported #186
Merged
+182
−28
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(related to #185): In the present case, it is a bit confusing as those two values are identical:
|
Thanks a lot for trying it out! Yes, it has to detect if Python is statically linked or not and then prints the right message. |
Needs a rebase. |
tkf
force-pushed
the
friendly-message
branch
from
September 6, 2018 01:08
d3c0815
to
87ca784
Compare
Pull Request Test Coverage Report for Build 478
💛 - Coveralls |
tkf
changed the title
WIP: Fail with a helpful message if separate cache is not supported
Fail with a helpful message if separate cache is not supported
Sep 6, 2018
Rebased and added some more tests. I think it's good to go. For incompatible $ python2 -c "from julia import Main"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "julia/core.py", line 172, in load_module
JuliaMainModule(self, fullname))
File "julia/core.py", line 77, in __init__
self._julia = loader.julia
File "julia/core.py", line 164, in julia
self.__class__.julia = julia = Julia()
File "julia/core.py", line 574, in __init__
raise_separate_cache_error(runtime, jlinfo)
File "julia/core.py", line 404, in raise_separate_cache_error
raise RuntimeError(message)
RuntimeError: It seems your Julia and PyJulia setup are not supported.
Julia interpreter:
julia
Python interpreter and libpython used by PyCall.jl:
/home/takafumi/.virtualenvs/julia1.0/bin/python3
/usr/lib/libpython3.7m.so.1.0
Python interpreter used to import PyJulia and its libpython.
/usr/bin/python2
/usr/lib/libpython2.7.so.1.0
In Julia >= 0.7, above two paths to `libpython` have to match exactly
in order for PyJulia to work. To configure PyCall.jl to use Python
interpreter "/usr/bin/python2",
run the following commands in the Julia interpreter:
ENV["PYTHON"] = "/usr/bin/python2"
using Pkg
Pkg.build("PyCall")
For more information, see:
https://github.com/JuliaPy/pyjulia
https://github.com/JuliaPy/PyCall.jl When libpython is statically linked: $ ~/miniconda3/bin/python -c "from julia import Main"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/home/takafumi/repos/watch/pyjulia/julia/core.py", line 172, in load_module
JuliaMainModule(self, fullname))
File "/home/takafumi/repos/watch/pyjulia/julia/core.py", line 77, in __init__
self._julia = loader.julia
File "/home/takafumi/repos/watch/pyjulia/julia/core.py", line 164, in julia
self.__class__.julia = julia = Julia()
File "/home/takafumi/repos/watch/pyjulia/julia/core.py", line 574, in __init__
raise_separate_cache_error(runtime, jlinfo)
File "/home/takafumi/repos/watch/pyjulia/julia/core.py", line 404, in raise_separate_cache_error
raise RuntimeError(message)
RuntimeError: It seems your Julia and PyJulia setup are not supported.
Julia interpreter:
julia
Python interpreter and libpython used by PyCall.jl:
/home/takafumi/.virtualenvs/julia1.0/bin/python3
/usr/lib/libpython3.7m.so.1.0
Python interpreter used to import PyJulia and its libpython.
/home/takafumi/miniconda3/bin/python
/home/takafumi/miniconda3/lib/libpython3.6m.so.1.0
Your Python interpreter "/home/takafumi/miniconda3/bin/python"
is statically linked to libpython. Currently, PyJulia does not support
such Python interpreter. For available workarounds, see:
https://github.com/JuliaPy/pyjulia/issues/185
For more information, see:
https://github.com/JuliaPy/pyjulia
https://github.com/JuliaPy/PyCall.jl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It needs some discussion. Also, #183 has to be merged first.
With this PR, user will see error message like this which saves their time for googling the issues.
I'm not 100% sure we want this. We should probably be better just support it. Supporting it via
DEPOT_PATH
may not be so bad (#173).ref: #185