bionanoimaging / FourierTools.jl

Tools for working with Fourier space.
https://bionanoimaging.github.io/FourierTools.jl/stable/
MIT License
54 stars 6 forks source link

Cannot install #10

Closed paulnakroshis closed 2 years ago

paulnakroshis commented 2 years ago

I tried installing FourierTools in Julia 1.6.4, and received an error message in the REPL: Any suggestions? Or is this a known issue? Best, -paul

(@v1.6) pkg> add FourierTools
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Zygote [e88e6eb3]:
 Zygote [e88e6eb3] log:
 ├─possible versions are: 0.1.0-0.6.32 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.6.32
 ├─restricted by compatibility requirements with RayTracer [60dacb86] to versions: 0.4.0-0.5.17
 │ └─RayTracer [60dacb86] log:
 │   ├─possible versions are: 0.1.0-0.1.4 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.4
 │   └─restricted by compatibility requirements with Flux [587475ba] to versions: 0.1.2-0.1.4 or uninstalled, leaving only versions: 0.1.2-0.1.4
 │     └─Flux [587475ba] log:
 │       ├─possible versions are: 0.4.1-0.12.8 or uninstalled
 │       ├─restricted to versions * by an explicit requirement, leaving only versions 0.4.1-0.12.8
 │       ├─restricted by compatibility requirements with CUDA [052768ef] to versions: [0.4.1-0.10.4, 0.11.2-0.12.8] or uninstalled, leaving only versions: [0.4.1-0.10.4, 0.11.2-0.12.8]
 │       │ └─CUDA [052768ef] log:
 │       │   ├─possible versions are: 0.1.0-3.5.0 or uninstalled
 │       │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-3.5.0
 │       │   └─restricted by julia compatibility requirements to versions: [2.3.0, 2.5.0-3.5.0] or uninstalled, leaving only versions: [2.3.0, 2.5.0-3.5.0]
 │       ├─restricted by compatibility requirements with RayTracer [60dacb86] to versions: 0.9.0-0.11.6, leaving only versions: [0.9.0-0.10.4, 0.11.2-0.11.6]
 │       │ └─RayTracer [60dacb86] log: see above
 │       └─restricted by compatibility requirements with Colors [5ae59095] to versions: 0.10.2-0.12.8 or uninstalled, leaving only versions: [0.10.2-0.10.4, 0.11.2-0.11.6]
 │         └─Colors [5ae59095] log:
 │           ├─possible versions are: 0.9.0-0.12.8 or uninstalled
 │           ├─restricted to versions * by an explicit requirement, leaving only versions 0.9.0-0.12.8
 │           └─restricted by compatibility requirements with InteractiveViz [d14badfc] to versions: 0.11.2-0.12.8
 │             └─InteractiveViz [d14badfc] log:
 │               ├─possible versions are: 0.1.0-0.2.0 or uninstalled
 │               └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.2.0
 └─restricted by compatibility requirements with FillArrays [1a297f60] to versions: [0.1.0-0.3.1, 0.6.1-0.6.32] or uninstalled — no versions left
   └─FillArrays [1a297f60] log:
     ├─possible versions are: 0.2.0-0.12.7 or uninstalled
     ├─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.8.0-0.12.7
     │ └─Distributions [31c24e10] log:
     │   ├─possible versions are: 0.16.0-0.25.34 or uninstalled
     │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.16.0-0.25.34
     │   ├─restricted by compatibility requirements with SignalAnalysis [df1fea92] to versions: 0.23.0-0.25.34
     │   │ └─SignalAnalysis [df1fea92] log:
     │   │   ├─possible versions are: 0.1.0-0.4.1 or uninstalled
     │   │   └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.4.1
     │   └─restricted by compatibility requirements with FillArrays [1a297f60] to versions: [0.16.0-0.21.9, 0.24.11-0.25.34] or uninstalled, leaving only versions: 0.24.11-0.25.34
     │     └─FillArrays [1a297f60] log: see above
     └─restricted by compatibility requirements with LazyArrays [5078a376] to versions: 0.11.0-0.12.7
       └─LazyArrays [5078a376] log:
         ├─possible versions are: 0.0.1-0.22.4 or uninstalled
         ├─restricted to versions * by an explicit requirement, leaving only versions 0.0.1-0.22.4
         └─restricted by compatibility requirements with FourierTools [b18b359b] to versions: [0.20.0-0.20.9, 0.21.3-0.21.20]
           └─FourierTools [b18b359b] log:
             ├─possible versions are: 0.1.0-0.2.4 or uninstalled
             └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.2.4
roflmaostc commented 2 years ago

I guess this is an issue with your environment. Start your REPL and do

(@v1.6) pkg> st
      Status `~/.julia/environments/v1.6/Project.toml`
  [6e4b80f9] BenchmarkTools v1.2.0
  [5ae59095] Colors v0.12.8
  [da5c29d0] EllipsisNotation v1.1.1
  [7a1cc6ca] FFTW v1.4.5
  [7073ff75] IJulia v1.23.2
  [82e4d734] ImageIO v0.5.9

By default Julia installs packages into the global environment. Global environments can get quite messy after a time and cause such issues.

To fix, you should definitely use environments for different projects/code. Like this:

╭─fxw@earth ~  
╰─➤  cd /tmp                                            [29-11-21 | 11:52:59]
╭─fxw@earth /tmp  
╰─➤  mkdir project_Lel                                  [29-11-21 | 11:53:01]
╭─fxw@earth /tmp  
╰─➤  cd project_Lel                                     [29-11-21 | 11:53:03]
╭─fxw@earth /tmp/project_Lel  
╰─➤  julia                                              [29-11-21 | 11:53:04]
At startup Revise.jl and OhMyREPL.jl loaded               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.3 (2021-09-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> activate .
  Activating new environment at `/tmp/project_Lel/Project.toml`

(project_Lel) pkg> add FourierTools
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
    Updating `/tmp/project_Lel/Project.toml`
  [b18b359b] + FourierTools v0.2.4
    Updating `/tmp/project_Lel/Manifest.toml`
  [621f4979] + AbstractFFTs v1.0.1
  [79e6a3ab] + Adapt v3.3.1
  [4c555306] + ArrayLayouts v0.7.8
  [d360d2e6] + ChainRulesCore v1.11.1
  [34da2185] + Compat v3.40.0
  [7a1cc6ca] + FFTW v1.4.5
  [1a297f60] + FillArrays v0.12.7
  [b18b359b] + FourierTools v0.2.4
  [613c443e] + IndexFunArrays v0.2.3
  [692b3bcd] + JLLWrappers v1.3.0
  [5078a376] + LazyArrays v0.21.20
  [1914dd2f] + MacroTools v0.5.9
  [a3b82374] + MatrixFactorizations v0.8.5
  [98581153] + NDTools v0.3.2
  [6fe1bfb0] + OffsetArrays v1.10.8
  [5432bcbf] + PaddedViews v0.5.10
  [21216c6a] + Preferences v1.2.2
  [189a3867] + Reexport v1.2.2
  [1277b4bf] + ShiftedArrays v1.0.0
  [90137ffa] + StaticArrays v1.2.13
  [f5851436] + FFTW_jll v3.3.10+0
  [1d5cc7b8] + IntelOpenMP_jll v2018.0.3+2
  [856f044c] + MKL_jll v2021.1.1+2
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [8bb1440f] + DelimitedFiles
  [8ba89e20] + Distributed
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [4af54fe1] + LazyArtifacts
  [b27032c2] + LibCURL
  [76f85450] + LibGit2
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [44cfe95a] + Pkg
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [1a1011a3] + SharedArrays
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [fa267f1f] + TOML
  [a4e569a6] + Tar
  [8dfed614] + Test
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [83775a58] + Zlib_jll
  [8e850ede] + nghttp2_jll
  [3f19e933] + p7zip_jll

(project_Lel) pkg> st
      Status `/tmp/project_Lel/Project.toml`
  [b18b359b] FourierTools v0.2.4
roflmaostc commented 2 years ago

So in your case

├─restricted by compatibility requirements with RayTracer [60dacb86] to versions: 0.4.0-0.5.17

Zygote is restricted by RayTracer to an old version

paulnakroshis commented 2 years ago

Thanks so much! Problem solved! :-) -paul