# \#pycall

**URL:** https://discourse.julialang.org/tag/pycall/22.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Setting Conda enviroment as Python executable for PyCall.jl](https://discourse.julialang.org/t/setting-conda-enviroment-as-python-executable-for-pycall-jl/125132)

<div class="topic-metadata">

**Author:** [@AntonioMoralesPerez](https://discourse.julialang.org/u/AntonioMoralesPerez)\
**Replies:** 2\
**Last updated:** [June 9, 2026, 6:40am UTC](https://discourse.julialang.org/t/setting-conda-enviroment-as-python-executable-for-pycall-jl/125132 "2026-06-09T06:40:17Z")

</div>

I tried to change the Python executable on PyCall.jl but it doesn’t change after building. Some code showing my problem: ❯ julia \_ \_ \_ \_(\_)\_ | Documentation: https://docs.julialang.org (\_)…

---

## [\`using Pycall\` on Google Colab makes Julia runtime crash](https://discourse.julialang.org/t/using-pycall-on-google-colab-makes-julia-runtime-crash/136718)

<div class="topic-metadata">

**Author:** [@funatsufumiya](https://discourse.julialang.org/u/funatsufumiya)\
**Replies:** 3\
**Last updated:** [April 15, 2026, 4:51am UTC](https://discourse.julialang.org/t/using-pycall-on-google-colab-makes-julia-runtime-crash/136718 "2026-04-15T04:51:22Z")

</div>

I’d like to use PyCall on Google Colab Julia runtime, but not succeeded. import Pkg; Pkg.add("PyCall") works, however, using PyCall would crash. run(which python) shows /usr/local/bin/python, run(which pip) shows /usr/…

---

## [Can't install PyCall](https://discourse.julialang.org/t/cant-install-pycall/135546)

<div class="topic-metadata">

**Author:** [@Redwood](https://discourse.julialang.org/u/Redwood)\
**Replies:** 7\
**Last updated:** [February 21, 2026, 4:20am UTC](https://discourse.julialang.org/t/cant-install-pycall/135546 "2026-02-21T04:20:46Z")

</div>

I’ve tried to install PyCall numerous times, but can never get it to work. I’ve tried manually setting the environment variable PYTHON to the directory where the lastest python.exe file is, but that doesn’t work. When I …

---

## [Julia crashed when using PyCall in multiple threads](https://discourse.julialang.org/t/julia-crashed-when-using-pycall-in-multiple-threads/111004)

<div class="topic-metadata">

**Author:** [@wly](https://discourse.julialang.org/u/wly)\
**Replies:** 14\
**Last updated:** [January 24, 2026, 10:56am UTC](https://discourse.julialang.org/t/julia-crashed-when-using-pycall-in-multiple-threads/111004 "2026-01-24T10:56:24Z")

</div>

I first make multiple copies of a PyObject, and then access them in multiple threads. Finally, I meet this error. julia -t5 using PyCall py""" class A(): x = 0.0 a = A() """ alist = \[deepcopy(py"a") for i in 1:10…

---

## [Using Meta/Facebook Prophet with Conda/PyCall](https://discourse.julialang.org/t/using-meta-facebook-prophet-with-conda-pycall/132011)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 10\
**Last updated:** [September 10, 2025, 4:26pm UTC](https://discourse.julialang.org/t/using-meta-facebook-prophet-with-conda-pycall/132011 "2025-09-10T16:26:55Z")

</div>

Hi, I run into problems when trying to run the example code from: What I did: import Pkg ENV\["PYTHON"\]="" Pkg.build("PyCall") Restarted the Julia CLI, then: import Pkg Pkg.add("Conda") using Conda Conda.runconda(\`…

---

## [Using PyCall with a non default Julia managed Conda Environment](https://discourse.julialang.org/t/using-pycall-with-a-non-default-julia-managed-conda-environment/131842)

<div class="topic-metadata">

**Author:** [@LouisPauchet](https://discourse.julialang.org/u/LouisPauchet)\
**Replies:** 1\
**Last updated:** [August 25, 2025, 1:50pm UTC](https://discourse.julialang.org/t/using-pycall-with-a-non-default-julia-managed-conda-environment/131842 "2025-08-25T13:50:06Z")

</div>

Hi Julia Community, I’m working on a project where I want to use PyCall, but I’d like to avoid the default Julia-managed Conda environment. Instead, I want to specify a custom environment. Here’s what I’m trying to achi…

---

## [Using functions loaded via pycall (kwargs)](https://discourse.julialang.org/t/using-functions-loaded-via-pycall-kwargs/131775)

<div class="topic-metadata">

**Author:** [@Geegee](https://discourse.julialang.org/u/Geegee)\
**Replies:** 10\
**Last updated:** [August 24, 2025, 5:36am UTC](https://discourse.julialang.org/t/using-functions-loaded-via-pycall-kwargs/131775 "2025-08-24T05:36:33Z")

</div>

I think this might be an easy thing but currently I don’t know how to do this. I managed to import my python code and can call it but part of the functions require me to do something like f(x=a, y=c, \*\*rest) and as Ju…

---

## [Stereonet diagram](https://discourse.julialang.org/t/stereonet-diagram/73121)

<div class="topic-metadata">

**Author:** [@Gravlax](https://discourse.julialang.org/u/Gravlax)\
**Replies:** 13\
**Last updated:** [August 20, 2025, 12:49pm UTC](https://discourse.julialang.org/t/stereonet-diagram/73121 "2025-08-20T12:49:14Z")

</div>

Dear all, I was wondering if any of you have came across a package that could be use for making stereonets (stereographic projections on a Wulff/Schmidt nets), e.g.: I’ve not found any examples of such diagram constr…

---

## [OpenSSL\_jll error after PyCall-importing a module which uses libcrypto](https://discourse.julialang.org/t/openssl-jll-error-after-pycall-importing-a-module-which-uses-libcrypto/129806)

<div class="topic-metadata">

**Author:** [@polhager](https://discourse.julialang.org/u/polhager)\
**Replies:** 0\
**Last updated:** [June 11, 2025, 1:53pm UTC](https://discourse.julialang.org/t/openssl-jll-error-after-pycall-importing-a-module-which-uses-libcrypto/129806 "2025-06-11T13:53:15Z")

</div>

So OpenSSL\_jll uses libcrypto and libssl, both of which are downloaded as artifacts. libssl has a dependency on libcrypto, so when loading libssl the system also looks for libcrypto. During normal usage, everything works…

---

## [Define Python function in Julia file with PythonCall?](https://discourse.julialang.org/t/define-python-function-in-julia-file-with-pythoncall/98593)

<div class="topic-metadata">

**Author:** [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Replies:** 10\
**Last updated:** [April 9, 2025, 1:02pm UTC](https://discourse.julialang.org/t/define-python-function-in-julia-file-with-pythoncall/98593 "2025-04-09T13:02:22Z")

</div>

Context: I have a Pluto notebook for teaching where I need to create a Python function. I want to use PythonCall for better portability, but I miss the py"..." syntax of PyCall which allows you to directly define Python …

---

## [PyCall import local package](https://discourse.julialang.org/t/pycall-import-local-package/127440)

<div class="topic-metadata">

**Author:** [@larstz](https://discourse.julialang.org/u/larstz)\
**Replies:** 0\
**Last updated:** [March 28, 2025, 9:16am UTC](https://discourse.julialang.org/t/pycall-import-local-package/127440 "2025-03-28T09:16:01Z")

</div>

Hi everyone, I’m having trouble importing a local Python package using PyCall in Julia. I have a working Python environment where I’ve successfully installed my local package with the command: pip install local\_package…

---

## [PyCall numpy vdot Vector{Float32} returns Float64](https://discourse.julialang.org/t/pycall-numpy-vdot-vector-float32-returns-float64/126768)

<div class="topic-metadata">

**Author:** [@osimonn](https://discourse.julialang.org/u/osimonn)\
**Replies:** 3\
**Last updated:** [March 10, 2025, 7:58pm UTC](https://discourse.julialang.org/t/pycall-numpy-vdot-vector-float32-returns-float64/126768 "2025-03-10T19:58:31Z")

</div>

I have been comparing numpy using PyCall with Julia recently and observed a strange behavior. When I call numpy from Julia and do a dot product of two Vector{Float32} vectors, the result is Float64. However, when I run …

---

## [PyCall returning numpy arrays](https://discourse.julialang.org/t/pycall-returning-numpy-arrays/125836)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 19\
**Last updated:** [February 15, 2025, 9:35am UTC](https://discourse.julialang.org/t/pycall-returning-numpy-arrays/125836 "2025-02-15T09:35:54Z")

</div>

I am trying to return a numpy array to Julia without copying. It took me some time to understand that pycall(py"myPythonFunctionReturningaNumPyArray", PyArray, filename) seems to be the only way to prevent the system …

---

## [PyCall deprecation warning - getindex o.x vs o\[x\] where x is a julia variable](https://discourse.julialang.org/t/pycall-deprecation-warning-getindex-o-x-vs-o-x-where-x-is-a-julia-variable/125495)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 4\
**Last updated:** [February 4, 2025, 10:53am UTC](https://discourse.julialang.org/t/pycall-deprecation-warning-getindex-o-x-vs-o-x-where-x-is-a-julia-variable/125495 "2025-02-04T10:53:49Z")

</div>

All I get the following deprecation warning Warning: \`getindex(o::PyObject, s::AbstractString)\` is deprecated in favor of dot overloading (\`getproperty\`) so elements should now be accessed as e.g. \`o."s"\` instead of \`…

---

## [REPL hangs](https://discourse.julialang.org/t/repl-hangs/124410)

<div class="topic-metadata">

**Author:** [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Replies:** 4\
**Last updated:** [January 17, 2025, 1:35pm UTC](https://discourse.julialang.org/t/repl-hangs/124410 "2025-01-17T13:35:14Z")

</div>

Hi all I am having issues with a code snipped in REPL. As seen in the video the REPL hangs (or at least it is VERY slow) at two lines. Surprisingly the first line is a comment line. The other line with the issue is th…

---

## [Error with importing matplotlib.pyplot for use with PyCall.jl](https://discourse.julialang.org/t/error-with-importing-matplotlib-pyplot-for-use-with-pycall-jl/124062)

<div class="topic-metadata">

**Author:** [@ericdammannjr](https://discourse.julialang.org/u/ericdammannjr)\
**Replies:** 5\
**Last updated:** [December 23, 2024, 7:35pm UTC](https://discourse.julialang.org/t/error-with-importing-matplotlib-pyplot-for-use-with-pycall-jl/124062 "2024-12-23T19:35:41Z")

</div>

I am having an issue with PyCall.jl. For context, I am using a Windows PC with a Julia 1.11.2 and Python 3.13.1. I first created a Python virtual environment in the following directory: "C:\\Research Software\\Python\\Virt…

---

## [PyCall pointing to correct venv but not picking up the correct path (likely related to .pythonstartup)](https://discourse.julialang.org/t/pycall-pointing-to-correct-venv-but-not-picking-up-the-correct-path-likely-related-to-pythonstartup/122922)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 2\
**Last updated:** [November 26, 2024, 2:51am UTC](https://discourse.julialang.org/t/pycall-pointing-to-correct-venv-but-not-picking-up-the-correct-path-likely-related-to-pythonstartup/122922 "2024-11-26T02:51:31Z")

</div>

Hi all, I have PyCall.jl configured to point towards my venv. For example: julia\> using PyCall julia\> PyCall.python "/home/colin/.pyvenv1/bin/python3" This is exactly where I want it to point. Next, I do the followin…

---

## [Julia-Python interface fails in Julia library likely due to wrong SSL credentials](https://discourse.julialang.org/t/julia-python-interface-fails-in-julia-library-likely-due-to-wrong-ssl-credentials/121675)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 18\
**Last updated:** [November 13, 2024, 5:28pm UTC](https://discourse.julialang.org/t/julia-python-interface-fails-in-julia-library-likely-due-to-wrong-ssl-credentials/121675 "2024-11-13T17:28:51Z")

</div>

Hi all, I am experiencing a very complicated bug regarding SSL certification in a Julia package integrated with Python using PyCall and/or PythonCall (we have problems with the two actually, so probably the source of er…

---

## [How to evaluate Python custom code in PythonCall?](https://discourse.julialang.org/t/how-to-evaluate-python-custom-code-in-pythoncall/116113)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 7\
**Last updated:** [June 24, 2024, 10:23am UTC](https://discourse.julialang.org/t/how-to-evaluate-python-custom-code-in-pythoncall/116113 "2024-06-24T10:23:27Z")

</div>

While I agree that most “call Python in Julia” refers to call existing libraries, I sometimes find it useful to be able to evaluate custom defined Python code from Julia. Which is the PythonCall equivalent to this PyCal…

---

## [PyCall defaults to global python, despite ENV\["PYTHON"\] = ""](https://discourse.julialang.org/t/pycall-defaults-to-global-python-despite-env-python/115909)

<div class="topic-metadata">

**Author:** [@thomaskroi1996](https://discourse.julialang.org/u/thomaskroi1996)\
**Replies:** 0\
**Last updated:** [June 20, 2024, 8:53am UTC](https://discourse.julialang.org/t/pycall-defaults-to-global-python-despite-env-python/115909 "2024-06-20T08:53:27Z")

</div>

Hello everyone! I am currently trying to get some CGAL bindings to work on Julia v1.9. Unfourtunately CGAL.jl does not work for Julia v1.9, so i have to resort to using PyCall and the python bindings! I have used PyCal…

---

## [Run multiple python instances with pycall in different threads](https://discourse.julialang.org/t/run-multiple-python-instances-with-pycall-in-different-threads/78399)

<div class="topic-metadata">

**Author:** [@Tyde](https://discourse.julialang.org/u/Tyde)\
**Replies:** 6\
**Last updated:** [June 13, 2024, 7:06am UTC](https://discourse.julialang.org/t/run-multiple-python-instances-with-pycall-in-different-threads/78399 "2024-06-13T07:06:11Z")

</div>

Hi, I have a project where I need to call python code via PyCall.jl. This python code itself does interact with a third-party library (In this case I use pyspice the control the simulation of multiple circuits). To incr…

---

## [Behaviour of Ref?](https://discourse.julialang.org/t/behaviour-of-ref/115321)

<div class="topic-metadata">

**Author:** [@dmolina](https://discourse.julialang.org/u/dmolina)\
**Replies:** 1\
**Last updated:** [June 7, 2024, 12:08pm UTC](https://discourse.julialang.org/t/behaviour-of-ref/115321 "2024-06-07T12:08:19Z")

</div>

Hello everybody, I am trying to use Ref to change a variable, and it does not work as expected (at least, as I expected). julia\> a = 5 5 julia\> typeof(a) Int64 julia\> b = Ref(a) Base.RefValue{Int64}(5) julia\> typeof…

---

## [Packaging a Julia library with PyJulia](https://discourse.julialang.org/t/packaging-a-julia-library-with-pyjulia/108900)

<div class="topic-metadata">

**Author:** [@stefanjon](https://discourse.julialang.org/u/stefanjon)\
**Replies:** 8\
**Last updated:** [February 12, 2024, 5:59am UTC](https://discourse.julialang.org/t/packaging-a-julia-library-with-pyjulia/108900 "2024-02-12T05:59:14Z")

</div>

I have a general question about the possibilities of Packaging a Julia library that is wrapped in python using PyJulia so that it can easily be put into a wheel for distribution. To give some context, I have develop an …

---

## [Issues in conda-based simultaneous installation of PyCall and RCall](https://discourse.julialang.org/t/issues-in-conda-based-simultaneous-installation-of-pycall-and-rcall/108183)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [December 30, 2023, 3:27pm UTC](https://discourse.julialang.org/t/issues-in-conda-based-simultaneous-installation-of-pycall-and-rcall/108183 "2023-12-30T15:27:56Z")

</div>

Hello, I have a project where I use both PyCall and RCall with both downloaded using conda (i.e. I set both ENV\["PYTHON"\] = "" and ENV\["R\_HOME"\] = "\*"). Now the issue is in github CI, where conda complains of package co…

---

## [How to copy the result of python to Julia without allocation memory using PyCall](https://discourse.julialang.org/t/how-to-copy-the-result-of-python-to-julia-without-allocation-memory-using-pycall/107480)

<div class="topic-metadata">

**Author:** [@wly](https://discourse.julialang.org/u/wly)\
**Replies:** 8\
**Last updated:** [December 12, 2023, 11:49am UTC](https://discourse.julialang.org/t/how-to-copy-the-result-of-python-to-julia-without-allocation-memory-using-pycall/107480 "2023-12-12T11:49:19Z")

</div>

I have a Python program whose results will be saved in a big numpy array. I want to use this result in my Julia program, but I find that accessing the data will cause memory allocation in Julia. A demo is as follows: us…

---

## [Creating an package (and eventually app) with Python dependencies](https://discourse.julialang.org/t/creating-an-package-and-eventually-app-with-python-dependencies/107317)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 9\
**Last updated:** [December 9, 2023, 6:37pm UTC](https://discourse.julialang.org/t/creating-an-package-and-eventually-app-with-python-dependencies/107317 "2023-12-09T18:37:21Z")

</div>

I’m working on my first package ever in any language. I want to eventually turn this package into an standalone app (using PackageCompiler.jl). I am running into some trouble. My (local) package MyPackage uses a python …

---

## [Julia using openpyxl to change column width & row height](https://discourse.julialang.org/t/julia-using-openpyxl-to-change-column-width-row-height/45172)

<div class="topic-metadata">

**Author:** [@Emmanouil\_Bakirtzis](https://discourse.julialang.org/u/Emmanouil_Bakirtzis)\
**Replies:** 8\
**Last updated:** [November 23, 2023, 3:57pm UTC](https://discourse.julialang.org/t/julia-using-openpyxl-to-change-column-width-row-height/45172 "2023-11-23T15:57:21Z")

</div>

Hi all, I am using Julia 1.5.0 with openpyxl and I want to change the column width in an excel worksheet. The python way to this is depicted here: https://stackoverflow.com/questions/53906532/is-it-possible-to-change-…

---

## [Confused by behavior when changing ENV\["PYTHONPATH"\] in new module](https://discourse.julialang.org/t/confused-by-behavior-when-changing-env-pythonpath-in-new-module/104408)

<div class="topic-metadata">

**Author:** [@mgalenb](https://discourse.julialang.org/u/mgalenb)\
**Replies:** 0\
**Last updated:** [September 29, 2023, 6:48pm UTC](https://discourse.julialang.org/t/confused-by-behavior-when-changing-env-pythonpath-in-new-module/104408 "2023-09-29T18:48:01Z")

</div>

I am making a module (which has a local python env installed) and I am trying to add a path to ENV\[“PYTHONPATH”\] and then import a module I am hacking in module Test ENV\["PYTHONPATH"\]=joinpath(dirname(@\_\_FILE\_\_), "pyth…

---

## [ImpedanceFitter](https://discourse.julialang.org/t/impedancefitter/90103)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 1\
**Last updated:** [September 14, 2023, 1:42pm UTC](https://discourse.julialang.org/t/impedancefitter/90103 "2023-09-14T13:42:07Z")

</div>

I have the impression that currently only one Julia package exists for the purpose of equivalent-circuit fitting, which is: EquivalentCircuits And there some around in the Python world. One of them is impedancefitter. …

---

## [Python setup across multiple dependent packages using PyCall](https://discourse.julialang.org/t/python-setup-across-multiple-dependent-packages-using-pycall/103270)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 1\
**Last updated:** [September 5, 2023, 6:41pm UTC](https://discourse.julialang.org/t/python-setup-across-multiple-dependent-packages-using-pycall/103270 "2023-09-05T18:41:44Z")

</div>

Hi, Does anyone knows how to setup a Julia package that uses Python via another imported package that includes the PyCall setup? Here a more detailed explanation: I am developing a series of packages that depend of eac…

[Next page](https://discourse.julialang.org/tag/pycall/22.md?match_all_tags=true&page=1&tags%5B%5D=pycall)
