@@ -12,10 +12,9 @@ Installation
1212------------
1313
1414** Note:** If you are using Python installed with Ubuntu or ` conda ` ,
15- PyJulia does not work by default with standard Python interpreter and
16- Julia ≥ 0.7. For workarounds, see [ Troubleshooting] ( #troubleshooting )
17- below. Same caution applies to other Debian-based and possibly other
18- GNU/Linux distributions.
15+ PyJulia may not work with Julia ≥ 0.7. For workarounds, see
16+ [ Troubleshooting] ( #troubleshooting ) below. Same caution applies to
17+ other Debian-based and possibly other GNU/Linux distributions.
1918
2019You will need to install PyCall in your existing Julia installation
2120
@@ -298,14 +297,15 @@ supporting the PyJulia to load PyCall stopped working.
298297To understand the issue, you need to understand a bit of details in
299298PyCall implementation. PyCall uses Julia's precompilation mechanism
300299to reduce JIT compilation required while Julia is loading it. This
301- results in encoding the path to libpython used by PyCall when it's
302- loaded from ` julia ` . Furthermore, libpython ABI such as C struct
300+ results in embedding the path to libpython used by PyCall to its
301+ precompilation cache . Furthermore, libpython ABI such as C struct
303302layout varies across Python versions. Currently, this is determined
304303while precompiling PyJulia and cannot be changed at run-time.
305- Consequently, PyCall only works if it loads the same libpython in
306- Julia and Python. This is why PyJulia has to be imported in a Python
307- executable dynamically linked to libpython, if it shares the same
308- PyCall precompilation cache.
304+ Consequently, PyJulia can use the precompilation cache of PyCall
305+ created by standard Julia module loader only if the PyCall cache is
306+ compiled with the libjulia used by the current Python process. This
307+ is why PyJulia has to be imported in a Python executable dynamically
308+ linked to libpython.
309309
310310The aforementioned hack worked by monkey-patching Julia's
311311precompilation mechanism to emit the precompilation cache file to
0 commit comments