I'm getting the following error when running a Julia code in Atom. Can someone please help me with this?
ERROR: LoadError: Failed to precompile Atom to /Users/xxx/.julia/lib/v0.5/Atom.ji.
in compilecache(::String) at ./loading.jl:593
in require(::Symbol) at ./loading.jl:422
in require(::Symbol) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in include_from_node1(::String) at ./loading.jl:488
in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/xxx/.atom/packages/julia-client/script/boot.jl, in expression starting on line 29
Related
I recently installed Julia version 0.7.0 (I need this older version). Prior to that, I had installed Julia 1.6.2, and I can use it in Jupyter notebook. Now, through Julia command line in version 0.7.0, I installed IJulia, and after launching the jupyter notebook through the same command line, I am not able to open notebooks in version 0.7.0. I only see options for 1.6.2.
How can I launch a notebook with version 0.7.0 of Julia?
UPDATE
Now I am able to see Julia 0.7.0 as an option when I open Jupyter notebook, but now the kernel does not connect when I want to use it for this specific version. It works fine for version 1.6.2.
I have tried opening a notebook in two different ways:
From anaconda command line: The notebook launches, but the kernel does not connect. The following error keeps repeating:
ERROR: LoadError: MethodError: no method matching setindex!(::Ptr{Nothing}, ::Ptr{Nothing})
Stacktrace:
[1] start_heartbeat(::ZMQ.Socket) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\heartbeat.jl:20
[2] init(::Array{String,1}) at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\init.jl:100
[3] top-level scope at none:0
[4] include at .\boot.jl:317 [inlined]
[5] include_relative(::Module, ::String) at .\loading.jl:1038
[6] include(::Module, ::String) at .\sysimg.jl:29
[7] exec_options(::Base.JLOptions) at .\client.jl:239
[8] _start() at .\client.jl:432
in expression starting at C:\Users\josh\.julia\packages\IJulia\AQu2H\src\kernel.jl:24
From Julia command line: I get a message that says Process Exited(1) at the end without opening any notebook.
Try
julia> using Pkg; Pkg.build("IJulia")
within the 0.7 REPL. This should install the Jupyter kernel for Julia 0.7 and make it available as an option.
In case that doesn't work for some reason, you can also try explicitly calling the installkernel function:
julia> installkernel("Julia 0.7")
I am trying to add Flux into my package repository in Julia but I am getting an error.
I typed pkg> add Flux but Julia REPL returns "5 dependencies errored".
And they are:
LLVM
GPUCompiler
CUDA
NNlibCUDA
Flux
To see a full report either run import Pkg; Pkg.precompile() or load the packages
I ran the command precompile and this is what i got.
ERROR: The following 1 direct dependency failed to precompile:
Flux [587475ba-b771-5e3f-ad9e-33799f191a9c]
Failed to precompile Flux [587475ba-b771-5e3f-ad9e-33799f191a9c] to
C:\Users\Kostas\.julia\compiled\v1.6\Flux\jl_3C4D.tmp.
ERROR: LoadError: could not load library "C:\Users\Kostas\.julia\juliaup\julia-
1.6.4+0~x64\bin\LLVM.dll"
The specified module could not be found.
Stacktrace:
[1] dlopen
# .\libdl.jl:114 [inlined]
[2] #dlopen#2
# .\libdl.jl:110 [inlined]
[3] dlopen (repeats 2 times)
# .\libdl.jl:110 [inlined]
[4] loaded_llvm()
# LLVM.API C:\Users\Kostas\.julia\packages\LLVM\shuW4\src\LLVM.jl:49
[5] top-level scope
# C:\Users\Kostas\.julia\packages\LLVM\shuW4\src\LLVM.jl:60
[6] top-level scope (repeats 2 times)
# none:1
Any ideas how can i fix this and use Flux properly?
I have a Julia package I developed locally, let's call it mypack, and I can't automatically test it with Julia in pkg mode. Running pkg>test mypack gives me the following error:
(v1.3) pkg> test mypack
Updating registry at `~/.julia/environments/v1.3/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Testing mypack
Resolving package versions...
[ Info: No changes
Status `/tmp/jl_m6URie/Manifest.toml`
[4e168b6d] mypack v0.1.0 [`~/Documents/mypack`]
ERROR: LoadError: ArgumentError: Package Test not found in current path:
- Run `import Pkg; Pkg.add("Test")` to install the Test package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:887
[2] include at ./boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1105
[4] include(::Module, ::String) at ./Base.jl:31
[5] include(::String) at ./client.jl:424
[6] top-level scope at none:6
in expression starting at /home/myname/Documents/mypack/test/runtests.jl:1
ERROR: Package mypack errored during testing
My mypack project has the expected structure where there's a root directory with a Project.toml and Manifest.toml generated using ]generate mypack. /test/runtests.jl is just the line
using Test
This works on two machines that I've tested it on, one of which was using Julia 1.1 and one which was using Julia 1.2. The errors are happening on a new install of Julia 1.3.
I am able to test other packages (such as Statistics just fine, which I did to make sure Test was working). I have a more complicated project which brought this to my attention, but this mypack MWE is also broken.
When you run Pkg.test, Pkg creates a test environment. This environment consists of direct dependencies and test dependencies. Any dependency which is imported by test/runtests.jl needs to be in this test environment.
Because your test/runtests.jl imports the Test standard library, you need to add it as a test dependency. You can add test dependencies using this method: https://julialang.github.io/Pkg.jl/v1/creating-packages/#Test-specific-dependencies-in-Julia-1.0-and-1.1-1.
I need to run a code written in Julia 0.5.
I installed this version on macOS and when I run
using Pkg
It returns the error:
ERROR: ArgumentError: Module Pkg not found in current path.
Run `Pkg.add("Pkg")` to install the Pkg package.
in require(::Symbol) at ./loading.jl:365
in require(::Symbol) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
When I run
Pkg.add("Pkg")
It returns
INFO: Initializing package repository /Users/henrique/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: unknown package Pkg
in macro expansion at ./pkg/entry.jl:53 [inlined]
in (::Base.Pkg.Entry.##2#5{String,Base.Pkg.Types.VersionSet})() at ./task.jl:360
in sync_end() at ./task.jl:311
in macro expansion at ./task.jl:327 [inlined]
in add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:31
in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:59
in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
How to get Pkg in Julia 0.5 then?
That is a very old version of Julia. It is strongly recommended to use a recent version, see the downloads page: https://julialang.org/downloads/. In 0.5 the Pkg module was available by default, so I'm not sure how using Pkg doesn't work. In general, if you're following recent instructions, they're not going to work on such an old version of the language.
I had to reinstall a newer version of Julia because the earlier version got broke. Having installed a newer version of Julia, I upgraded to the newer kernel on Jupyter; unfortunately, when I open an existing Julia notebook, the kernel automatically dies.
Following a suggestion from this link I issued this command
conda remove ipykernel
to resolve the problem; because I don't have sudo rights the following error was thrown:
CondaIOError: Missing write permissions in ...
Is there is a way to resolve this issue without creating a virtual environment?
Following your #xiaodai and #Przemyslaw Szufel suggestions, I'm halted by this error
using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Stacktrace:
[1] _require(::Base.PkgId) at ./loading.jl:929
[2] require(::Base.PkgId) at ./loading.jl:858
[3] require(::Module, ::Symbol) at ./loading.jl:853
[4] include at ./boot.jl:326 [inlined]
[5] include_relative(::Module, ::String) at ./loading.jl:1038
[6] include(::Module, ::String) at ./sysimg.jl:29
[7] top-level scope at none:2
[8] eval at ./boot.jl:328 [inlined]
[9] eval(::Expr) at ./client.jl:404
[10] top-level scope at ./none:3
in expression starting at /storage/home/julia_depot/packages/IJulia/9ajf8/src/IJulia.jl:36
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to /storage/home/julia_depot/compiled/v1.1/IJu
lia/nfu7T.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
I have as suggested by the error message issued
Pkg.instantiate()
Also, I have tried
using ZMQ
ERROR: ArgumentError: Package ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Although, ZMQ has been installed.
I have this happen to me often. You can try to follow #Przemyslaw's advice and remove the folders or try this
]update
]build IJulia
using IJulia
notebook()
Typically add builds the IJulia, but I find that sometimes after updating, running build manually can help resolve the dead kernel issue.
Use the Anaconda built-into Julia to start the jupyter notebook. In this way you will not have administrative rights nor configure virtual env to manage your Python installation.
julia> ]
(v1.0) pkg> add IJulia
julia> using IJulia
julia> notebook()
Actually you can also run the Julia Jupyter notebook outside of Julia console!
Windows (note that paths on your system might be different):
C:\> %userprofile%\.julia\packages\Conda\hsaaN\deps\usr\Scripts\jupyter-notebook
Linux (note that paths on your system might be different, this should also work on OSX):
$ ~/.julia/packages/Conda/hsaaN/deps/usr/bin/jupyter notebook