# Can't install PyCall

**URL:** <https://discourse.julialang.org/t/cant-install-pycall/135546>\
**Category:** New to Julia\
**Tags:** question, package, pycall\
**Created:** [February 9, 2026, 11:27pm UTC](https://discourse.julialang.org/t/cant-install-pycall/135546 "2026-02-09T23:27:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redwood](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Redwood](https://discourse.julialang.org/u/Redwood)\
**Post date:** [February 9, 2026, 11:27pm UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/1 "2026-02-09T23:27:34Z")

</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 try Pkg.build(“PyCall”) I get a bunch of undecipherable errors. I’m almost at the point of removing both Python and Julia completely and trying to start over. Or can I simply get by without PyCall?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 9, 2026, 11:38pm UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/2 "2026-02-09T23:38:51Z")

</div>

It can be tricky. Which Julia version are you using? Which operating system?

Which Python package to you want to use, if any?

Have a look at [GitHub - aenarete/ControlPlots.jl: Easy to use plotting for control engineers and students](https://github.com/aenarete/ControlPlots.jl?tab=readme-ov-file#installation)

If you use Julia 1.12, you might have to launch it with `julia -t 1,0`

It might be easier to use PythonPlot.jl or PythonCall.jl

---

<div class="post-metadata">

**Author:** ![Redwood](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Redwood](https://discourse.julialang.org/u/Redwood)\
**Post date:** [February 10, 2026, 6:52am UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/3 "2026-02-10T06:52:22Z")

</div>

Thank you for getting back to me. I may have gotten myself in trouble with Python, as I’d had installed from the Python website, but had also installed Anaconda. I’m going to try to get rid of Anaconda anyway, as I don’t think I need it nowadays.

I’m using the latest version of Julia that I got by running juliaup update. So it looks like i’m using 1.12.  
I’m running Julia several ways:

- Through Visual Studio Code, both running .jl files and using the REPL window at times
- Calling up Julia from the terminal window
- I may be using Pluto as well, as I’m currently taking an MIT online course that uses Julia.

My operating system is Windows 11, which I upgraded to last fall. My computer has a CPU with 10 cores and 32 GB RAM.

I will have a look at the GitHub site you recommended. BTW, if I can get along without Python altogether, I’ll gladly do so. I’m not very fond of it for a number of reasons. I do most of my stats work in R, but I want to develop an app to estimate discrete choice models. I currently do a lot of work in C#, although I’ll revert to C sometimes as a trusty standby.

I did try to install PythonCall.jl, but it seemed to want PyCall, so it failed to install.

Again, thank you so much for reaching out to me.

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [February 10, 2026, 8:26am UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/4 "2026-02-10T08:26:30Z")

</div>

> [@Redwood](#):
>
> BTW, if I can get along without Python altogether, I’ll gladly do so.

If you don’t need it, don’t use it. If you need it, please explain for what purpose. There might be good Julia alternatives that do not depend on Python.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 10, 2026, 2:59pm UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/5 "2026-02-10T14:59:49Z")

</div>

> [@Redwood](#):
>
> Thank you for getting back to me. I may have gotten myself in trouble with Python, as I’d had installed from the Python website, but had also installed Anaconda. I’m going to try to get rid of Anaconda anyway, as I don’t think I need it nowadays.

Probably you have a bunch of environment variables from your multiple Python installations that are confusing things. (Does Python run okay when you launch it separately?)

Realize also that PyCall, by default, will install its own Miniconda Python distro, which might get confused if you have global environment variables (like `PYTHONPATH`) set from your other install.

You need to decide _which_ Python you want to use. If you want to use the one that Julia/PyCall installs, then unset your Python-related environment variables. On the other hand, if you want to manage your own Python installation, you should (a) pick one and make sure it works and (b) tell PyCall to use it by setting the `PYTHON` environment variable when building PyCall (as explained in the documentation).

> [@Redwood](#):
>
> I did try to install [PythonCall.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/PythonCall), but it seemed to want PyCall, so it failed to install.

PythonCall does not use PyCall. But it _also_ installs its own Python by default IIRC, which will also be confused if your environment is littered with variables from multiple other Python installations.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [February 10, 2026, 8:08pm UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/6 "2026-02-10T20:08:23Z")

</div>

Could you describe what you would like to do with PyCall.jl or if there is a particular package you would like to install that requires it? If we know this, I think we can better advise on the path forward.

---

<div class="post-metadata">

**Author:** ![Redwood](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Redwood](https://discourse.julialang.org/u/Redwood)\
**Post date:** [February 21, 2026, 2:55am UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/7 "2026-02-21T02:55:48Z")

</div>

It seems that there are a number of packages that require PyCall. One of them is PhysicalConstants

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 21, 2026, 4:20am UTC](https://discourse.julialang.org/t/cant-install-pycall/135546/8 "2026-02-21T04:20:46Z")

</div>

> [@Redwood](#):
>
> It seems that there are a number of packages that require PyCall. One of them is PhysicalConstants

That doesn’t seem to be true: I think you may be confusing _weak_ dependencies ([package extensions](https://blog.glcs.io/package-extensions)) with _requirements_?

For example, PhysicalConstants.jl depends on Roots.jl (to solve for the [Lambert W](https://en.wikipedia.org/wiki/Lambert_W_function) function in [Wien’s law](https://en.wikipedia.org/wiki/Wien%27s_displacement_law) constants, apparently?), and Roots.jl has a package extension where it can _optionally_ integrate with SymPy.jl (which requires PyCall.jl) if it’s installed, but it doesn’t _require_ it.
