Skip to content

Commit a06ee77

Browse files
authored
docs: Code loading order (#625)
* added some docs for code loading edge case * moved to faq
1 parent a3e96f8 commit a06ee77

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/src/faq.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,17 @@ Related issues: [#255](https://github.com/JuliaPy/PythonCall.jl/issues/255)
8989
Yes, it may be possible. A good example of that is having Julia running inside the Python that is running inside Blender, as presented in [this Discourse post](https://discourse.julialang.org/t/running-julia-inside-blender-through-vscode-using-pythoncall-juliacall/96838/6).
9090
From the point that one has JuliaCall running inside Python, if it has access to the terminal, one can even launch a Julia REPL there, and if needed connect with VSCode Julia extension to it.
9191
The full Python script to install, launch JuliaCall, and launch a Julia REPL in Blender is [here](https://gist.github.com/cdsousa/d820d27174238c0d48e5252355584172).
92+
93+
## Using PythonCall.jl and CondaPkg.jl in a script
94+
95+
If running from a script, make sure that [CondaPkg.jl](https://github.com/JuliaPy/CondaPkg.jl) is used before [PythonCall.jl](https://github.com/JuliaPy/PythonCall.jl) to ensure proper loading of Python packages in your path. E.g.,
96+
97+
```julia
98+
using CondaPkg
99+
100+
CondaPkg.add("numpy")
101+
102+
using PythonCall
103+
104+
np = pyimport("numpy")
105+
```

0 commit comments

Comments
 (0)