You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/faq.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,28 @@
1
1
# FAQ & Troubleshooting
2
2
3
-
## Heap corruption when using PyTorch ([issue 215](https://github.com/cjdoris/PythonCall.jl/issues/215))
3
+
## Is PythonCall/JuliaCall thread safe?
4
+
5
+
No.
6
+
7
+
Some rules if you are writing multithreaded code:
8
+
- Only call Python functions from the first thread.
9
+
- You probably also need to call `PythonCall.GC.disable()` on the main thread before any
10
+
threaded block of code. Remember to call `PythonCall.GC.enable()` again afterwards.
11
+
(This is because Julia finalizers can be called from any thread.)
12
+
- You may still encounter problems (see [#201](https://github.com/cjdoris/PythonCall.jl/issues/201), [#202](https://github.com/cjdoris/PythonCall.jl/issues/202)).
13
+
14
+
## Does it work on Apple silicon (ARM, M1, M2, ...)?
15
+
16
+
Maybe. Your mileage may vary.
17
+
18
+
In general, PythonCall and JuliaCall are only supported on platforms with
19
+
[Tier 1](https://julialang.org/downloads/#supported_platforms) level of support by Julia.
20
+
Currently, Apple silicon is Tier 2, so is not supported.
21
+
22
+
Due to time constraints, issues affecting only unsupported platforms will not be
23
+
investigated. It is much more likely to be an issue with Julia itself than PythonCall.
24
+
25
+
## Heap corruption when using PyTorch ([#215](https://github.com/cjdoris/PythonCall.jl/issues/215))
4
26
5
27
On some systems, you may see an error like the following when using `torch` and `juliacall`:
6
28
```text
@@ -12,7 +34,7 @@ Python(65251,0x104cf8580) malloc: *** set a breakpoint in malloc_error_break to
12
34
13
35
A solution is to ensure that `juliacall` is imported before `torch`.
14
36
15
-
## `ccall requries the compiler` error when importing some Python libraries
37
+
## `ccall requries the compiler` error when importing some Python libraries ([#255](https://github.com/cjdoris/PythonCall.jl/issues/255))
16
38
On some systems, you may see an error like the following when import e.g. `matplotlib` before `juliacall`:
As described in [issue 255](https://github.com/cjdoris/PythonCall.jl/issues/255), the likely problem is that the "other" Python library (`matplotlib`, whatever) is loading the system `libstdc++.so`, which isn't compatible with the `libstdc++.so` that Julia ships with.
53
+
The likely problem is that the "other" Python library (`matplotlib`, whatever) is loading the system `libstdc++.so`, which isn't compatible with the `libstdc++.so` that Julia ships with.
32
54
Linux distributions with older `libstdc++` versions seem more likely to suffer from this issue.
0 commit comments