Error with CSV when trying install LaTeXStrings into Julia - julia

I am new to Julia simply trying to install LaTeXStrings with Julia v1.5.0.
using DataFrames
using CSV
using Pkg
using Plots
Pkg.add("LaTeXStrings")
using LaTeXStrings
but I get the following error
Resolving package versions...
ERROR: LoadError: Unsatisfiable requirements detected for package CSV [336ed68f]:
CSV [336ed68f] log:
├─CSV [336ed68f] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
Stacktrace:
[1] check_constraints(::Pkg.Resolve.Graph) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:935
[2] Pkg.Resolve.Graph(::Dict{Base.UUID,Set{VersionNumber}}, ::Dict{Base.UUID,Dict{VersionNumber,Dict{String,Base.UUID}}}, ::Dict{Base.UUID,Dict{VersionNumber,Dict{String,Pkg.Types.VersionSpec}}}, ::Dict{Base.UUID,String}, ::Dict{Base.UUID,Pkg.Types.VersionSpec}, ::Dict{Base.UUID,Pkg.Resolve.Fixed}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:362
[3] deps_graph(::Pkg.Types.Context, ::Dict{Base.UUID,String}, ::Dict{Base.UUID,Pkg.Types.VersionSpec}, ::Dict{Base.UUID,Pkg.Resolve.Fixed}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:495
[4] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:367
[5] targeted_resolve at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1107 [inlined]
[6] tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1093
[7] _resolve at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1113 [inlined]
[8] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Linux) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1128
[9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Linux, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:189
[10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:140
[11] #add#21 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[12] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[13] #add#20 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[14] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[15] add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[16] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[17] top-level scope at /home/nick/mesa-r11701/star/test_suite/rsp_Cepheid_grid/CMD.jl:5
[18] include(::Function, ::Module, ::String) at ./Base.jl:380
[19] include(::Module, ::String) at ./Base.jl:368
[20] exec_options(::Base.JLOptions) at ./client.jl:296
[21] _start() at ./client.jl:506
What am I missing here? I already have CSV installed and it is working perfectly.

In Windows 10, I followed these steps :
Open C:\Users\user\.julia\registries
Delete everything within this folder ( Don't worry they will be autocreated )
Open Julia terminal. At this point you should be at julia> prompt
Enter ] and press enter. At this point you should be at pkg prompt
add CSV
To go back to julia prompt press Ctrl + C.
This will resolve the issue. Please note deleting registry folder contents means all previous packages will be deleted. You need to add all packages one by one. However it is worthy.

Such problems are usually caused by cluttering the current environment, or having old versions of several packages.
If you're using base environment, create a new one and install packages there by by
using Pkg
pkg"activate ." # activates new environment
pkg"add DataFrames CSV Plots LaTeXStrings" # adds all packages using handy macro
using DataFrames, CSV, Plots, LaTeXStrings
if it does not help, delete Manifest.toml and upgrade all your packages.
If it's successful, following versions should be installed
using Pkg
pkg"st"
[336ed68f] CSV v0.7.7
[a93c6f00] DataFrames v0.21.6
[b964fa9f] LaTeXStrings v1.1.0
[91a5bcdd] Plots v1.5.8
[44cfe95a] Pkg
Also, if you already have clutterd the base environment, clean it up.
You can see it by
using Pkg
pkg"activate; st"
which prints list of packages installed in the base environment.

Related

How to resolve: "resolving package versions" in Julia?

I am new to the programming language Julia. I ran a few mixed models using the MixedModels package. Then, i wanted to run some average marginal effects using the Effects package. However, i get an error (see below).
To solve this issue, i tried to update all packages by using Pkg.update(). Then, i tried to install a particular version of the Effects package by using Pkg.rm("Effects") Pkg.add("Effects", v"0.1.4"). However, none of these options solved the issue. Could someone point out to me please what am i doing wrong?
Pkg.add("Effects")
Resolving package versions...
Unsatisfiable requirements detected for package Effects [8f03c58b]:
Effects [8f03c58b] 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 julia compatibility requirements to versions: uninstalled — no versions left
Stacktrace:
[1] propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:1005
[2] propagate_constraints! at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:946 [inlined] (repeats 2 times)
[3] simplify_graph!(::Pkg.Resolve.Graph, ::Set{Int64}; clean_graph::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:1460
[4] simplify_graph! at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:1460 [inlined] (repeats 2 times)
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:375
[6] targeted_resolve at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1114 [inlined]
[7] tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1100
[8] _resolve at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1120 [inlined]
[9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.MacOS) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1135
[10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.MacOS, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:188
[11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:139
[12] #add#21 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[13] add at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
[14] #add#20 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[15] add at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
[16] add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[17] add(::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
[18] top-level scope at In[216]:1
[19] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091
It looks like you are using Julia version 1.5, but all existing versions of the Effects package require at least Julia version 1.6 (see Effects/Compat.toml). If you can, you should upgrade Julia to 1.6 since that is (at the time of writing) the supported stable version.
To explain the error message a bit:
Effects [8f03c58b] 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 julia compatibility requirements to versions: uninstalled — no versions left
The resolver starts with all existing versions as options (0.1.0-0.1.4) including the option to not have the package installed at all (uninstalled).
The second line filters out the uninstalled option since you are requesting it to be installed (explicit requirement). * is a version wildcard which just means that you have not requested a specific version to be installed.
The third line is then causing the error, due to requirements on the Julia version all the remaining options are filtered out and you get no versions left, i.e. no more remaining options.

Error in Julia while installing DifferentialEquations package

I am starting with Julia and trying to install the packages. I am using version 1.5.0 and have Windows 10. However I am stacked on the following error:
Resolving package versions...
Cloning [bea87d4a-7f5b-5778-9afe-8cc45184846c] SuiteSparse_jll from https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl.git
Installed SuiteSparse_jll ─ v5.4.0+9
Downloading artifact: SuiteSparse
Downloading artifact: SuiteSparse
ERROR: Unable to automatically install 'SuiteSparse' from 'C:\Users\username\.julia\packages\SuiteSparse_jll\CZHvV\Artifacts.toml'
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] ensure_artifact_installed(::String, ::Dict{String,Any}, ::String; platform::Pkg.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Artifacts.jl:898
[3] ensure_all_artifacts_installed(::String; platform::Pkg.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Artifacts.jl:962
[4] download_artifacts(::Pkg.Types.Context, ::Array{String,1}; platform::Pkg.BinaryPlatforms.Windows, verbose::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:656
[5] download_artifacts(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; platform::Pkg.BinaryPlatforms.Windows, verbose::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:635
[6] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1134
[7] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:189
[8] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:140
[9] #add#21 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[10] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[11] #add#20 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[12] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[13] add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[14] add(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[15] top-level scope at REPL[11]:1
[16] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088
Can anyone help?
Sounds like it is choking on installing some Artifacts for a dependency. This is probably the Artifacts.toml it is looking at:
https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl/blob/main/Artifacts.toml
You can navigate into your C:/Users/<username>/.julia/packages/SuiteSparse_jll/ directory and see the exact one it is using.
And it is going into the last few lines of that file trying to get it to work on Windows 10 by downloading and unzipping that .tar.gz file at the end.
That file has in its bin folder the following dlls:
So it may be that the package isn't quite working for Julia 1.5 yet... you could try it on a previous version, like Julia 1.3.1.
It may be that you have restricted permissions on downloading or the unzipping failed, though I'd expect a different error. Or if you have a firewall that is blocking access to that file for some reason.
https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl/releases/download/SuiteSparse-v5.4.1+3/SuiteSparse.v5.4.1.x86_64-w64-mingw32.tar.gz
It should unzip somewhere in C:/Users/<username>/.julia/artifacts/

LoadError: InitError: While Precompiling in new Environment

I wanted to start using dedicated environments for all my julia projects, but activating the new environment and using packages (eg. Plots.jl) results in Precompiling that fails with the following error:
Activating environment at `~/Documents/baro/Project.toml`
julia> using Plots
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
ERROR: LoadError: InitError: could not load library "/home/marius/.julia/artifacts/08ab4b2de494e1d61e581ab1fbd610b0b4d1876f/lib/libavdevice.so"
libx264.so.157: cannot open shared object file: No such file or directory
Stacktrace:
[1] dlopen(::String, ::UInt32; throw_error::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109
[2] dlopen at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
[3] __init__() at /home/marius/.julia/packages/FFMPEG_jll/tCUYA/src/wrappers/x86_64-linux-gnu.jl:231
[4] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
[5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:781
[6] _require(::Base.PkgId) at ./loading.jl:1006
[7] require(::Base.PkgId) at ./loading.jl:927
[8] require(::Module, ::Symbol) at ./loading.jl:922
[9] include(::Module, ::String) at ./Base.jl:377
[10] top-level scope at none:2
[11] eval at ./boot.jl:331 [inlined]
[12] eval(::Expr) at ./client.jl:449
[13] top-level scope at ./none:3
during initialization of module FFMPEG_jll
in expression starting at /home/marius/.julia/packages/FFMPEG/vocw2/src/FFMPEG.jl:3
ERROR: LoadError: Failed to precompile FFMPEG [c87230d0-a227-11e9-1b43-d7ebe4e7570a] to /home/marius/.julia/compiled/v1.4/FFMPEG/TGvga_eB360.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
[6] include(::Module, ::String) at ./Base.jl:377
[7] top-level scope at none:2
[8] eval at ./boot.jl:331 [inlined]
[9] eval(::Expr) at ./client.jl:449
[10] top-level scope at ./none:3
in expression starting at /home/marius/.julia/packages/Plots/LWw1t/src/Plots.jl:15
ERROR: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to /home/marius/.julia/compiled/v1.4/Plots/ld3vC_eB360.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
This also happens for some other packages like ControlSystems.
The julia version is 1.4.2 but I was able to reproduce this error with 1.5.0 and on a different computer with 1.3.1 on it. Both systems are runnning Ubuntu 20.04 LTS.
What I tried so far was:
Rebuilding the package Pkg.build()
Check that the file supposed to load exists (it existed)
Update libx264
Deleting all packages in .julia folder and and reinstalling everything using Pkg.instantiate()
Any help to get the packages running will be greatly appreciated as I really like the idea of having dedicated environments for every project. Also on 1.3.1 even after switching to the default environment the error is still occuring.
The issue seems to lay in the FFMPEG package.
The following solved the issue for me:
Remove FFMPEG. Then delete the folder which is given in the error message. In your case: "/home/marius/.julia/artifacts/08ab4b2de494e1d61e581ab1fbd610b0b4d1876f/lib/libavdevice.so"
Then add FFPEG again which results in a change in the Manifest.toml which does not happen if you just remove FFMPEG:
Updating `~/.julia/environments/v1.3/Manifest.toml`
[1270edf5] ↓ x264_jll v2020.7.14+0 ⇒ v2019.5.25+2
Try: using FFMPEG, Plots.
I was able to precompile Plots then.

LoadError using Atom for Julia

I am attempting to do a standard install of Julia and the Atom IDE. I installed Julia 1.4.2 and Atom 1.48.0 as as well as uber-juno on Atom. Julia appears to have installed fine, but loading the console in Atom results in the following LoadError (have also tried doing this with Julia 1.0.5 with the same result). Any thoughts greatly appreciated?
ERROR:
LoadError:
UndefVarError: find_in_path not defined
Stacktrace:
[1] getproperty(::
Module, ::Symbol) at .\sysimg.jl:13
[2] top-level scope at C:\Users\johno\.atom\packages\julia-client\script\boot.jl:3
[3] include at .\boot.jl:317 [inlined]
[4] include_relative(::Module, ::String) at .\loading.jl:1044
[5] include(::Module, ::String) at .\sysimg.jl:29
[6] exec_options(::Base.JLOptions) at .\client.jl:266
[7] _start() at .\client.jl:425
in expression starting at C:\Users\johno\.atom\packages\julia-client\script\boot.jl:1
I fixed the issue. The default julia-client and julia-language packages installed in Atom were not up to date.

Problem installing MXNet.jl using Julia1.2 in UBUNTU 16.04

I am having some trouble installing "MXNet.jl" package in julia.
1) I first tryed typing:
(v1.2) pkg> add MXNet
and I get this:
(v1.2) pkg> add MXNet
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.2/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.2/Manifest.toml`
[no changes]
At this point, nothing wrong was going on. There were no error messages thrown. Nice. Now, I went back to the Julia REPL and tried to use the module, for which I wrote:
julia> using MXNet
[ Info: Precompiling MXNet [a7949054-b901-59c6-b8e3-7238c29bf7f0]
ERROR: LoadError: LoadError: IOError: open: permission denied (EACCES)
Stacktrace:
[1] uv_error at ./libuv.jl:90 [inlined]
[2] open(::String, ::UInt16, ::UInt16) at ./filesystem.jl:81
[3] touch(::String) at ./file.jl:404
[4] top-level scope at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/base.jl:60
[5] include at ./boot.jl:328 [inlined]
[6] include_relative(::Module, ::String) at ./loading.jl:1094
[7] include at ./Base.jl:31 [inlined]
[8] include(::String) at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:25
[9] top-level scope at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:138
[10] include at ./boot.jl:328 [inlined]
[11] include_relative(::Module, ::String) at ./loading.jl:1094
[12] include(::Module, ::String) at ./Base.jl:31
[13] top-level scope at none:2
[14] eval at ./boot.jl:330 [inlined]
[15] eval(::Expr) at ./client.jl:432
[16] top-level scope at ./none:3
in expression starting at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/base.jl:57
in expression starting at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:138
ERROR: Failed to precompile MXNet [a7949054-b901-59c6-b8e3-7238c29bf7f0] to /home/gbrunini/.julia/compiled/v1.2/MXNet/Sc0jU.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
[3] _require(::Base.PkgId) at ./loading.jl:1013
[4] require(::Base.PkgId) at ./loading.jl:911
[5] require(::Module, ::Symbol) at ./loading.jl:906
and all this error messages where thrown. Knowing my limitations with regards to all this errors I went to my second attempt, which consisted in what follows...
2) My second approach consisted in using brute force, so I copied and paste all the github scr folder for the julia MXNet.jl package to a given folder in my personal Desktop. This was done subroutine by subroutine, folder by folder, until I copied every file and folder. So it is fair to say that the scr folder in this link:
https://github.com/apache/incubator-mxnet/tree/master/julia/src
looks excatly like mine now.
Now, I went to my folder and proceeded as if "MXNet.jl" were any other ordinary function I used in the past, so I type (On julia REPL):
julia> include("MXNet.jl")
ERROR: LoadError: LoadError: Cannot find or load libmxnet.so. Please see the document on how to build it.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] top-level scope at /home/gbrunini/Desktop/TRABAJOS/MTI/MTI_Neural_network/MTI_ejemplo_simple_3/base.jl:55
[3] include at ./boot.jl:328 [inlined]
[4] include_relative(::Module, ::String) at ./loading.jl:1094
[5] include at ./Base.jl:31 [inlined]
[6] include(::String) at /home/gbrunini/Desktop/TRABAJOS/MTI/MTI_Neural_network/MTI_ejemplo_simple_3/MXNet.jl:25
[7] top-level scope at /home/gbrunini/Desktop/TRABAJOS/MTI/MTI_Neural_network/MTI_ejemplo_simple_3/MXNet.jl:150
[8] include at ./boot.jl:328 [inlined]
[9] include_relative(::Module, ::String) at ./loading.jl:1094
[10] include(::Module, ::String) at ./Base.jl:31
[11] include(::String) at ./client.jl:431
[12] top-level scope at REPL[1]:1
in expression starting at /home/gbrunini/Desktop/TRABAJOS/MTI/MTI_Neural_network/MTI_ejemplo_simple_3/base.jl:51
in expression starting at /home/gbrunini/Desktop/TRABAJOS/MTI/MTI_Neural_network/MTI_ejemplo_simple_3/MXNet.jl:150
Which returned all this error message.
My assumption is that there is something wrong with this libmxnet.so (I don't know what that is...) and I am tempted to follow steps 1-3 on this documentation(MXNet istallation guide), but I dont want to screw things up as I really dont know what any of the following commands do:
sudo apt-get update
sudo apt-get install -y build-essential git ninja-build ccache libopenblas-dev libopencv-dev cmake
git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
cd mxnet
cp config/linux.cmake config.cmake # or config/linux_gpu.cmake for build with CUDA
rm -rf build
mkdir -p build && cd build
cmake -GNinja ..
cmake --build .
nor what any of the followings do for the Julia:
mkdir julia-depot
export JULIA_DEPOT_PATH=$HOME/julia/julia-depot
a) whats a depot?
b) whats a environment variable (I looked online, and It confusses me...)
export MXNET_HOME=$HOME/incubator-mxnet
export LD_LIBRARY_PATH=$HOME/incubator-mxnet/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so:$LD_PRELOAD
export PATH=$HOME/bin:$HOME/.local/bin:$HOME/julia/julia-1.0.3/bin:$PATH
export JULIA_DEPOT_PATH=$HOME/julia/julia-depot
export MXNET_HOME=$HOME/incubator-mxnet
export LD_LIBRARY_PATH=$HOME/incubator-mxnet/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so:$LD_PRELOAD
julia --color=yes --project=./ -e \
'using Pkg; \
Pkg.develop(PackageSpec(name="MXNet", path = joinpath(ENV["MXNET_HOME"], "julia")))'
I really just want to install MXNet.jl and use it. If I understand all the rest as a side-efftect the better, but I settle with having all correctly installed, so for short:
What is the problem I am having?,
Do I fix it by just "copying and pasteing" the instructions in the documentation steps?
If not, how do I install MXNet.jl?,
Am I conffusing GPU with CPU(my option) installation? what changes
between the both?. I don't think that has anything to do with what happens here, but....
Thanks a lot in advance I hope you are all doing Ok.
UBUNTU 16.4
julia> versioninfo()
Julia Version 1.2.0
Commit c6da87ff4b (2019-08-20 00:03 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-2310 CPU # 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, sandybridge)
EDIT:
Following #Przemyslaw I went and installed the lastest julia version, julia1.4. I was hopping that by doing this, the permissions for writing into .julia would be fixed. However, the problem remains. I still get the following messages:
(#v1.4) pkg> add MXNet
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.4/Project.toml`
[a7949054] + MXNet v1.5.0
Updating `~/.julia/environments/v1.4/Manifest.toml`
[9e28174c] + BinDeps v1.0.1
[682c06a0] + JSON v0.21.0
[a7949054] + MXNet v1.5.0
[69de0a69] + Parsers v1.0.2
[30578b45] + URIParser v0.4.1
[8ba89e20] + Distributed
[a63ad114] + Mmap
[8dfed614] + Test
julia> using MXNet
[ Info: Precompiling MXNet [a7949054-b901-59c6-b8e3-7238c29bf7f0]
ERROR: LoadError: LoadError: IOError: open: permission denied (EACCES)
Stacktrace:
[1] uv_error at ./libuv.jl:97 [inlined]
[2] open(::String, ::UInt16, ::UInt16) at ./filesystem.jl:87
[3] touch(::String) at ./file.jl:422
[4] top-level scope at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/base.jl:60
[5] include(::Module, ::String) at ./Base.jl:377
[6] include(::String) at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:25
[7] top-level scope at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:138
[8] include(::Module, ::String) at ./Base.jl:377
[9] top-level scope at none:2
[10] eval at ./boot.jl:331 [inlined]
[11] eval(::Expr) at ./client.jl:449
[12] top-level scope at ./none:3
in expression starting at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/base.jl:57
in expression starting at /home/gbrunini/.julia/packages/MXNet/XoVCW/src/MXNet.jl:138
ERROR: Failed to precompile MXNet [a7949054-b901-59c6-b8e3-7238c29bf7f0] to /home/gbrunini/.julia/compiled/v1.4/MXNet/Sc0jU_ATtl5.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
julia> versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-2310 CPU # 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, sandybridge)
So,
Why is installing a new julia not fixing the issue over .julia?
All other pakages I have install works fine, is MXNet.jl the only package that needs to write over .julia?
Problem seems related to the lines:
if isempty(MXNET_LIB)
# touch this file, so that after the user properly build libmxnet, the precompiled
# MXNet.ji will be re-compiled to get MXNET_LIB properly.
touch(#__FILE__)
error("Cannot find or load libmxnet.$(Libdl.dlext). " *
"Please see the document on how to build it.")
else
include_dependency(MXNET_LIB)
end
in the base.jl subroutine of MXNet.jl. Any idea what this means?
The output of your add MXNet command shows that it is already installed.
However, it fails to precompile because your Julia process does not have sufficient permissions.
Your Julia needs to be able to write to /home/gbrunini/.julia/, otherwise the modules will not able to precompile and load. Try to set up permissions and rebuild the package with build MXNet
The above folder is your default JULIA_DEPOT_PATH. You can configure that variable to point store all Julia packages in a different location but this does not seem to be your problem (unless you are unable to configure permission for /home/gbrunini/.julia/ due some other reason).
The brute-force aproach is never a good way to go since Julia packages have many external dependencies. At Julia 1.2 they were managed by downloading the files when running package build (that is why you should rebuild). In the current Julia there is a more elegant solution with Julia artifacts.

Resources