MultivariateStats (PCA)

and

Please help me in error. I am using Manjaro Linux.

See: Arpack_jll artifacts unable to see OpenBLAS_jll artifacts for linking · Issue #97 · JuliaLinearAlgebra/Arpack.jl · GitHub

Also, please see this post with some tips on how to make it easier to help you. In particular, pasting in properly formatted code rather than screenshots is preferred.

1 Like

Agreed, although OP has been pointed to this many times before (including on the last topic he opened, just a week ago, and over a year go initially) so I’ve given up on re-posting the link at this point…

1 Like
(@v1.7) pkg> st --manifest Arpack
      Status `~/.julia/environments/v1.7/Manifest.toml`
  [7d9fca2a] Arpack v0.5.3

julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d* (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, sandybridge)

julia> using LinearAlgebra; BLAS.vendor()
┌ Warning: `vendor()` is deprecated, use `BLAS.get_config()` and inspect the output instead
│   caller = top-level scope at REPL[4]:1
└ @ Core REPL[4]:1
:openblas

(@v1.7) pkg> st --manifest Arpack_jll
      Status `~/.julia/environments/v1.7/Manifest.toml`
  [68821587] Arpack_jll v3.5.1+1

(@v1.7) pkg> st --manifest OpenBLAS_jll
      Status `~/.julia/environments/v1.7/Manifest.toml`
  [4536629a] OpenBLAS_jll

julia> using Libdl

julia> filter!(p -> occursin("blas", p), Libdl.dllist())
2-element Vector{String}:
 "/usr/bin/../lib/julia/libblas.so"
 "/usr/bin/../lib/julia/libblastrampoline.so

I have installed Julia in My Manjaro Linux by typing “snap install Julia” in CLI terminal.

      From worker 2:	Stacktrace:
      From worker 2:	 [1] include(x::String)
      From worker 2:	   @ MultivariateStats ~/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:1
      From worker 2:	 [2] top-level scope
      From worker 2:	   @ ~/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:113
      From worker 2:	 [3] top-level scope (repeats 2 times)
      From worker 2:	   @ none:1
      From worker 2:	in expression starting at /home/raman/.julia/packages/MultivariateStats/zLpz8/src/kpca.jl:3
      From worker 2:	in expression starting at /home/raman/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:1
      From worker 2:	ERROR: LoadError: InitError: could not load library "/home/raman/.julia/artifacts/cdf6dc8aa6771a61c6c65a5a5c1a8d1b75f50a2f/lib/libarpack.so"
      From worker 2:	libopenblas64_.so: cannot open shared object file: No such file or directory
      From worker 2:	Stacktrace:
      From worker 2:	 [1] macro expansion
      From worker 2:	   @ ~/.julia/packages/JLLWrappers/QpMQW/src/products/library_generators.jl:54 [inlined]
      From worker 2:	 [2] __init__()
      From worker 2:	   @ Arpack_jll ~/.julia/packages/Arpack_jll/zfgpQ/src/wrappers/x86_64-linux-gnu-libgfortran5.jl:10
      From worker 2:	 [3] top-level scope (repeats 2 times)
      From worker 2:	   @ none:1
      From worker 2:	during initialization of module Arpack_jll
      From worker 2:	in expression starting at /home/raman/.julia/packages/Arpack/pLziT/src/Arpack.jl:2
      From worker 2:	ERROR: LoadError: Failed to precompile Arpack [7d9fca2a-8960-54d3-9f78-7d1dccf2cb97] to /home/raman/.julia/compiled/v1.7/Arpack/jl_paZnaY.
      From worker 2:	Stacktrace:
      From worker 2:	 [1] include(x::String)
      From worker 2:	   @ MultivariateStats ~/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:1
      From worker 2:	 [2] top-level scope
      From worker 2:	   @ ~/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:113
      From worker 2:	 [3] top-level scope (repeats 2 times)
      From worker 2:	   @ none:1
      From worker 2:	in expression starting at /home/raman/.julia/packages/MultivariateStats/zLpz8/src/kpca.jl:3
      From worker 2:	in expression starting at /home/raman/.julia/packages/MultivariateStats/zLpz8/src/MultivariateStats.jl:1


Output in my Terminal while running code in Pluto.

Don’t do this, follow the Linux installation instructions instead:

1 Like

If you’re on Manjaro, the best thing to do is install from the AUR. Go into Pacman, search for julia-bin, then install that. Make sure you have AUR support enabled. The version on Snap is broken.

    ~  cd /home/raman/julia-1.7.3/bin/                                1 ✘ 
    ~/julia-1.7.3/bin  julia                                            ✔ 
The application julia is not installed. It may be found in the following packages:
  community/julia 2:1.7.2-2	/usr/bin/julia
Do you want to Install package julia? (y/N)  


How to install from binary ?

    /bin  cd                                                127 ✘  34s  
    ~  cd /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin          ✔ 
    ~/julia-1.7.3-/j/bin  julia                                         ✔ 
The application julia is not installed. It may be found in the following packages:
  community/julia 2:1.7.2-2	/usr/bin/julia
Do you want to Install package julia? (y/N)  N 
    ~/julia-1.7.3-/j/bin  cd /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin/
    ~/julia-1.7.3-/j/bin  julia                                         ✔ 
The application julia is not installed. It may be found in the following packages:
  community/julia 2:1.7.2-2	/usr/bin/julia
Do you want to Install package julia? (y/N)  M 
    ~/julia-1.7.3-/j/bin  cd /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin/julia/
cd: not a directory: /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin/julia/
    ~/julia-1.7.3-/j/bin  cd /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin/julia 
cd: not a directory: /home/raman/julia-1.7.3-linux-x86_64/julia-1.7.3/bin/julia
    ~/julia-1.7.3-/j/bin  
    ~  cd /home/raman/julia-1.7.3                                       ✔ 
    ~/julia-1.7.3  cd /home/raman/julia-1.7.3/bin/julia                 ✔ 
cd: not a directory: /home/raman/julia-1.7.3/bin/julia
    ~/julia-1.7.3  cd /home/raman/julia-1.7.3/bin/                    1 ✘ 
    ~/julia-1.7.3/bin  julia                                            ✔ 
The application julia is not installed. It may be found in the following packages:
  community/julia 2:1.7.2-2	/usr/bin/julia
Do you want to Install package julia? (y/N)  m 

I found this video on youtube helpful. Now i am able to open Julia by typing julia in CLI.

    ~  julia                                                            ✔ 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.7.3 (2022-05-06)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pluto
[ Info: Precompiling Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
┌ Info: 
│ 
│     Welcome to Pluto v0.19.8 🎈
│     Start a notebook server using:
│ 
│   julia> Pluto.run()
│ 
│     Have a look at the FAQ:
│     https://github.com/fonsp/Pluto.jl/wiki
└ 

julia> Pluto.run()
[ Info: Loading...
┌ Info: 
└ Opening http://localhost:1234/?secret=ezrIUdQ1 in your default browser... ~ have fun!
┌ Info: 
│ Press Ctrl+C in this terminal to stop Pluto