# Cannot use PyPlot on apple m1 due to PyQt5 installation problem

**URL:** <https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985>\
**Category:** New to Julia\
**Tags:** package, plotting, pyplot, mac-m1\
**Created:** [January 21, 2022, 1:54pm UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985 "2022-01-21T13:54:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpraveen](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cpraveen](https://discourse.julialang.org/u/cpraveen)\
**Post date:** [January 21, 2022, 1:54pm UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/1 "2022-01-21T13:54:58Z")

</div>

On apple m1, with julia 1.7, trying to use PyPlot fails because it is not able to install PyQt5

```julia
julia> using PyPlot
[ Info: Installing pyqt package to avoid buggy tkagg backend.
[ Info: Installing PyQt5 via the Conda pyqt package...
[ Info: Running `conda install -y pyqt` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - pyqt

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

```

Searching has not yielded any solutions. This post [Plotting fails on a fresh MacOS install - #2 by Alexandre\_Champagne](https://discourse.julialang.org/t/plotting-fails-on-a-fresh-macos-install/70272/2) also did not help

---

<div class="post-metadata">

**Author:** ![damonturney](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@damonturney](https://discourse.julialang.org/u/damonturney)\
**Post date:** [January 26, 2022, 5:31pm UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/2 "2022-01-26T17:31:12Z")

</div>

> [@cpraveen](#):
>
> with julia 1.7, trying to use PyPlot fails because it is not able to install PyQt5

Yes I have the exact same problem. This issue was recently posted to the PyPlots GitHub page here:

> <https://github.com/JuliaPy/PyPlot.jl/issues/542>
>
> \`\`\`
> 192 ~ % julia              
> \_
> \_ \_ \_(\_)\_ | Do…cumentation: https://docs.julialang.org
> (\_) | (\_) (\_) |
> \_ \_ \_| |\_ \_\_ \_ | Type "?" for help, "\]?" for Pkg help.
> | | | | | | |/ \_\` | |
> | | |\_| | | | (\_| | | Version 1.7.0 (2021-11-30)
> \_/ |\\\_\_'\_|\_|\_|\\\_\_'\_| | Official https://julialang.org/ release
> |\_\_/ |
> 
> julia\> using PyPlot
> \[ Info: Installing pyqt package to avoid buggy tkagg backend.
> \[ Info: Installing PyQt5 via the Conda pyqt package...
> \[ Info: Running \`conda install -y pyqt\` in root environment
> Collecting package metadata (current\_repodata.json): done
> Solving environment: failed with initial frozen solve. Retrying with flexible solve.
> Collecting package metadata (repodata.json): done
> Solving environment: failed with initial frozen solve. Retrying with flexible solve.
> 
> PackagesNotFoundError: The following packages are not available from current channels:
> 
> - pyqt
> 
> Current channels:
> 
> - https://conda.anaconda.org/conda-forge/osx-arm64
> - https://conda.anaconda.org/conda-forge/noarch
> 
> To search for alternate channels that may provide the conda package you're
> looking for, navigate to
> 
> https://anaconda.org
> 
> and use the search bar at the top of the page.
> 
> 
> 
> julia\> versioninfo()
> Julia Version 1.7.0
> Commit 3bf9d17731 (2021-11-30 12:12 UTC)
> Platform Info:
> OS: macOS (arm64-apple-darwin21.1.0)
> CPU: Apple M1
> WORD\_SIZE: 64
> LIBM: libopenlibm
> LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
> \`\`\`
> 
> Any known workarounds?

Let’s hope for a quick fix because this totally shuts down my science development. I use PyPlots intensely!

---

<div class="post-metadata">

**Author:** ![damonturney](https://avatars.discourse-cdn.com/v4/letter/d/ecae2f/32.png) [@damonturney](https://discourse.julialang.org/u/damonturney)\
**Post date:** [January 26, 2022, 6:20pm UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/3 "2022-01-26T18:20:13Z")

</div>

I was able to get pyqt working with PyPlots by installing pyqt via a special Conda channel:

Conda.add(“pyqt”, channel=“andfoy”)

Also it seems that conda channel robostack-experimental has pyqt for arm64… just wish I knew which channel was better or that I trusted these rare “one off” channels.

Why hasn’t Conda-forge added arm64 version of pyqt?

---

<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:** [January 26, 2022, 7:14pm UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/4 "2022-01-26T19:14:40Z")

</div>

> [@damonturney](#):
>
> Why hasn’t Conda-forge added arm64 version of pyqt?

They had one recently, because it works fine on my M1 mac with no tricks. Maybe run `using Conda; Conda.update()`?

You can always try a different backend by setting the `MPLBACKEND` environment variable.

---

<div class="post-metadata">

**Author:** ![cpraveen](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cpraveen](https://discourse.julialang.org/u/cpraveen)\
**Post date:** [February 1, 2022, 9:48am UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/5 "2022-02-01T09:48:10Z")

</div>

Updating conda still does not install pyqt for me. Changing backend to tkagg works but gives warning everytime

```julia
┌ Warning: PyPlot is using tkagg backend, which is known to cause crashes on MacOS (#410); use the MPLBACKEND environment variable to request a different backend.
└ @ PyPlot ~/.julia/packages/PyPlot/XaELc/src/init.jl:198
┌ Warning: `vendor()` is deprecated, use `BLAS.get_config()` and inspect the output instead
│ caller = npyinitialize() at numpy.jl:67
└ @ PyCall ~/.julia/packages/PyCall/L0fLP/src/numpy.jl:67

```

Is there a way to suppress these ?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [February 1, 2022, 9:54am UTC](https://discourse.julialang.org/t/cannot-use-pyplot-on-apple-m1-due-to-pyqt5-installation-problem/74985/6 "2022-02-01T09:54:42Z")

</div>

There is an open pull request: [https://github.com/JuliaPy/PyCall.jl/pull/950](https://github.com/JuliaPy/PyCall.jl/pull/950)
