@@ -12,10 +12,9 @@ Installation
12
12
------------
13
13
14
14
** 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.
19
18
20
19
You will need to install PyCall in your existing Julia installation
21
20
@@ -298,14 +297,15 @@ supporting the PyJulia to load PyCall stopped working.
298
297
To understand the issue, you need to understand a bit of details in
299
298
PyCall implementation. PyCall uses Julia's precompilation mechanism
300
299
to 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
303
302
layout varies across Python versions. Currently, this is determined
304
303
while 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.
309
309
310
310
The aforementioned hack worked by monkey-patching Julia's
311
311
precompilation mechanism to emit the precompilation cache file to
0 commit comments