# Error Importing \`OptimalTransport\`: \`UndefVarError: \_iszero\` Not Defined in \`LinearAlgebra\`

**URL:** <https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574>\
**Category:** General Usage\
**Tags:** package, import\
**Created:** [January 9, 2025, 10:33am UTC](https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574 "2025-01-09T10:33:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josemanuel22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josemanuel22/32/20668_2.png) [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Post date:** [January 9, 2025, 10:33am UTC](https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574/1 "2025-01-09T10:33:03Z")

</div>

Hello Julia Community,

I’m encountering an error when trying to import the `OptimalTransport` package, and I’m not sure how to resolve it. Below is the error message I receive:

```julia
Failed to precompile OptimalTransport [7e02d93a-ae51-4f58-b602-d97af76e3b33] to "/Users/jmfrutos/.julia/compiled/v1.11/OptimalTransport/jl_MlitRc".
ERROR: LoadError: UndefVarError: `_iszero` not defined in `LinearAlgebra`
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:42
 [2] top-level scope
   @ ~/.julia/packages/MutableArithmetics/mgg9J/src/dispatch.jl:287
 [3] include(mod::Module, _path::String)
   @ Base ./Base.jl:557
 [4] include(x::String)
   @ MutableArithmetics ~/.julia/packages/MutableArithmetics/mgg9J/src/MutableArithmetics.jl:7
 [5] top-level scope
   @ ~/.julia/packages/MutableArithmetics/mgg9J/src/MutableArithmetics.jl:92
 [6] include
   @ ./Base.jl:557 [inlined]
 [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)

```

**What I’ve Tried:**

- Verified that `OptimalTransport` does not declare `_iszero`; it consistently uses `iszero`, which is defined in `LinearAlgebra`.
- Noticed that the same issue occurs with the `MutableArithmetics` package.

**Additional Information:**

- Julia version: 1.11
- Operating System: macOS

**Question:**

Has anyone experienced this error before or can provide insights into why `_iszero` might be causing issues during the precompilation of `OptimalTransport`? Any suggestions on how to fix this would be greatly appreciated!

Thank you!

---

<div class="post-metadata">

**Author:** ![barucden](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barucden/32/26154_2.png) [@barucden](https://discourse.julialang.org/u/barucden)\
**Post date:** [January 9, 2025, 12:49pm UTC](https://discourse.julialang.org/t/error-importing-optimaltransport-undefvarerror-iszero-not-defined-in-linearalgebra/124574/2 "2025-01-09T12:49:03Z")

</div>

The error is likely related to [MutableArithmetics.jl/src/dispatch.jl at d75b9acdffeca53a0419984232546ed9dfa6b0ba · jump-dev/MutableArithmetics.jl · GitHub](https://github.com/jump-dev/MutableArithmetics.jl/blob/d75b9acdffeca53a0419984232546ed9dfa6b0ba/src/dispatch.jl#L630) but that line should execute only in older julia versions. Maybe you have an older version of MutableArithmetics without that `if VERSION >=` condition? Can you post the output of `]status`?
