# How to find and add the right version of packages for Flux.jl

**URL:** <https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843>\
**Category:** General Usage\
**Tags:** package, flux\
**Created:** [November 7, 2019, 7:28pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843 "2019-11-07T19:28:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michaela\_Maskova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michaela_maskova/32/8067_2.png) [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Post date:** [November 7, 2019, 7:28pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/1 "2019-11-07T19:28:22Z")

</div>

Hi there,

I’m trying to compile new Flux package in master version - as the Flux#master(0.9.0) is supposed to be quite better than the previous versions. I’ve been instructed to use Julia 1.3 but I don’t know how to make it all work.

Flux fails to precompile because of incompatibility with other packages (FFTW and Zygote). Is there a way to find which packages and which versions to use so that is at least precompiles and is ready to use?

Right now the problem seems to be with FFTW package which Flux is not able to load and it throws an error when I try to use `build FFTW`. FFTW version is 1.0.1 if that helps anyhow.

Also, is there a possibility to specify both #master version and specific version i.e. @0.4.3 for a package?

Thank you all for your help and if needed, I can definitely give more info about my issues.

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [November 7, 2019, 7:42pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/2 "2019-11-07T19:42:57Z")

</div>

In cases like this, it may be helpful to start with a clean project:

```julia
pkg> activate NewProject
pkg> add Flux#master
julia> using Flux

```

Then you can see if there are any issues and add any other dependencies you may need.

> [@Michaela\_Maskova](#):
>
> Also, is there a possibility to specify both #master version and specific version i.e. @0.4.3 for a package?

No, because the two requests may conflict with each other.

---

<div class="post-metadata">

**Author:** ![Michaela\_Maskova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michaela_maskova/32/8067_2.png) [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Post date:** [November 7, 2019, 7:50pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/3 "2019-11-07T19:50:33Z")

</div>

Thank you for suggestions, unfortunately this does not work and it probably is a different issue. I add `Flux#master` but when I try `using Flux` I get this error (which continues to three more errors about precompiling FFTW, Zygote and Flux):

```julia
julia> using Flux
[Info: Precompiling Flux [587475ba-b771-5e3f-ad9e-33799f191a9c]
ERROR: LoadError: LoadError: could not load library "C:\Users\masen\.julia\packages\FFTW\MJ7kl\deps\usr\bin\libfftw3-3.dll"
The specified module could not be found.

Stacktrace:
 [1] top-level scope at C:\Users\masen\.julia\packages\FFTW\MJ7kl\src\fft.jl:58
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1105
 [4] include at .\Base.jl:31 [inlined]
 [5] include(::String) at C:\Users\masen\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:1
 [6] top-level scope at C:\Users\masen\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:68
 [7] include at .\boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1105
 [9] include(::Module, ::String) at .\Base.jl:31
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:330 [inlined]
 [12] eval(::Expr) at .\client.jl:433
 [13] top-level scope at .\none:3
in expression starting at C:\Users\masen\.julia\packages\FFTW\MJ7kl\src\fft.jl:58
in expression starting at C:\Users\masen\.julia\packages\FFTW\MJ7kl\src\FFTW.jl:68

```

even though when adding Flux, FFTW was added.

Is it possible there’s not a problem with packages but something else?

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 7, 2019, 8:21pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/4 "2019-11-07T20:21:54Z")

</div>

My guess is that this is the know issue of missing `C:\julia\bin\7z.exe` from Julia 1.3 Windows binaries.

---

<div class="post-metadata">

**Author:** ![Michaela\_Maskova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michaela_maskova/32/8067_2.png) [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Post date:** [November 16, 2019, 8:28am UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/5 "2019-11-16T08:28:22Z")

</div>

Do you think @Tero_Frondelius, that this error is also because of the issue you mentioned?

```julia
ERROR: LoadError: LoadError: Could not find libcublas

```

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 16, 2019, 9:01am UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/6 "2019-11-16T09:01:33Z")

</div>

If you don’t have any specific reasons to use Julia 1.3 try Julia 1.2 everything should work there.

---

<div class="post-metadata">

**Author:** ![Michaela\_Maskova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michaela_maskova/32/8067_2.png) [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Post date:** [November 16, 2019, 12:32pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/7 "2019-11-16T12:32:14Z")

</div>

Julia 1.2 throws the same error ☹

---

<div class="post-metadata">

**Author:** ![Joshua\_Bowles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshua_bowles/32/4515_2.png) [@Joshua\_Bowles](https://discourse.julialang.org/u/Joshua_Bowles)\
**Post date:** [November 16, 2019, 2:29pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/8 "2019-11-16T14:29:21Z")

</div>

Have you tried deleting the .julia directory and re adding the package? I’m not on Windows so just kind guessing with the nuclear option 😁

---

<div class="post-metadata">

**Author:** ![improbable22](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/improbable22/32/5464_2.png) [@improbable22](https://discourse.julialang.org/u/improbable22)\
**Post date:** [November 16, 2019, 2:40pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/9 "2019-11-16T14:40:24Z")

</div>

Starting a clean environment is a good idea. But note that they “stack”, so that if your default environment has a million things installed, these are still available within a new one. I think this means their versions also influence what versions you get in a new environment. And I don’t think there’s a good way to understand what’s constraining what.

1.2 vs 1.3 probably makes no difference, except in that they will be default have different default environments.

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [November 16, 2019, 7:00pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/10 "2019-11-16T19:00:32Z")

</div>

> [@improbable22](#):
>
> I think this means their versions also influence what versions you get in a new environment

This is not accurate. The resolver only operates on the active project (the environment stack has no bearing on this process). With regards to environment stacking, the topmost project is guaranteed to work.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 16, 2019, 10:20pm UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/11 "2019-11-16T22:20:30Z")

</div>

> [@improbable22](#):
>
> 1.2 vs 1.3 probably makes no difference, except in that they will be default have different default environments.

I believe this issue is the difference: [Update packages that rely on 7z.exe being in the Sys.BINDIR folder · Issue #33687 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/33687) I am not an expert thus I might be wrong as well.

---

<div class="post-metadata">

**Author:** ![elkinjosuerc](https://avatars.discourse-cdn.com/v4/letter/e/b77776/32.png) [@elkinjosuerc](https://discourse.julialang.org/u/elkinjosuerc)\
**Post date:** [January 11, 2021, 3:51am UTC](https://discourse.julialang.org/t/how-to-find-and-add-the-right-version-of-packages-for-flux-jl/30843/12 "2021-01-11T03:51:19Z")

</div>

Hi, may you please tell me how can i delete the .julia directory?
