Julia 1.0 Pkg.add() not working as expected - julia

I am having trouble adding some packages in Julia
This is one example, although I am finding many others:
julia> Pkg.add("QuartzImageIO.jl")
ERROR: The following package names could not be resolved:
* QuartzImageIO.jl (not found in project, manifest or registry)
Please specify by known `name=uuid`.
I believe this should work according to the docs
https://github.com/JuliaIO/QuartzImageIO.jl
and Plotly that required it
LoadError: ArgumentError: Package QuartzImageIO not found in current path:
- Run `import Pkg; Pkg.add("QuartzImageIO")` to install the
QuartzImageIO package.
I am new to Julia, am I doing something wrong?
Thanks
Peter

The .jl suffix is not part of the package name (although packages are often referenced with it included) . Try
using Pkg
Pkg.add("QuartzImageIO")

If you install JuliaPro then the packages that you can install are limited by what's been curated for JuliaPro. Installed the non-pro vanilla version and try again.

Related

How to install a Julia package if it fails to install / build on an M1 Mac?

I am trying to use the Twitter.jl package locally on my M1 Mac. However, when I try to install it, I get:
ERROR: Error building `DecFP`:
┌ Warning: Platform `arm64-apple-darwin21.2.0` is not an officially supported platform
└ # BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
ERROR: LoadError: KeyError: key "unknown" not found
DecFP looks like it's an up to date Julia package so I am not sure what the issue would be in this case.
I would like to get a general set of steps to resolve issues like this since I know this package isn't the only one that will have installation issues so hopefully this can be used to help others who have similar issues.
The issue is that Twitter.jl is pulling an old version of OAuth.jl which doesn't work on the M1. I have opened a PR so it pulls a newer version and it should work.
About these cases in general the steps are identifying what package is using BinaryProvider, in this case it's an old MbedTLS that was pulled by an old OAuth. The solutions are, if there is a newer version, change the compat bounds, and if there isn't then one has to build the needed binary using BinaryBuilder.jl and change the dependent packages to use it.
In most cases just opening an issue in github should be enough :).

Cannot install any package in Julia

I had used Julia some months back for a project, and didn't use it since. I hadn't faced problems back then. But now, I absolutely am not able to install any package.
(#v1.5) pkg> add Distributions
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:
Distributions [31c24e10] log:
├─Distributions [31c24e10] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
Any package I install, I am getting the same error. How do I fix it?
This is the status of Pkg:
(#v1.5) pkg> status
Status `C:\Users\jaine\.julia\environments\v1.5\Project.toml`
[6e4b80f9] BenchmarkTools v0.5.0
[7073ff75] IJulia v1.21.2
[91a5bcdd] Plots v1.6.0
[438e738f] PyCall v1.91.4
[d330b81b] PyPlot v2.9.0
[2913bbd2] StatsBase v0.33.0
Given
├─Distributions [31c24e10] has no known versions!
it looks like you have a missing or corrupt package registry. The package manager will reinstall it for you if you delete .julia/registries and try to add the package again.
You can do this from within julia
rm(joinpath(homedir(), ".julia", "registries"), recursive=true, force=true)
These are indeed some of the more tricky situations to resolve so please bear with me as we work through this.
If you are not familiar with the basics of the package manager, it's worth a quick read to check out: https://julialang.github.io/Pkg.jl/v1/getting-started/
Assuming you are now in the Julia Repl, my general work flow for these issues is to remove everything it warns me about. The core problem here is that one of your existing packages is saying it needs a specific version of Distributions.jl but it's not able to add it. So, the first step would be to enter the pkg manager by doing ] and type rm Distributions.
Then, while still in the pkg mode, do resolve and add Distributions.
So the process is to just remove each package the Repl complains about until it stops complaining.
Note: If you run into something like this again, the worst-case scenario is to remove the project and manifest files for the specific Julia version you are using. If you navigate to ".julia/environments" you should be able to completely reset the Julia Env for a specific version there (that way you don't need to actually reinstall Julia).

Problem building Pardiso in Julia on Windows

I am trying to use the Pardiso package in Julia together with the Pardiso library. However, I can’t build the package. When I look into the build log, I see this message:
Looking in “C:\Users\Rodrigo.julia\packages\Pardiso\yZsYO\deps” for libraries
found “C:\Users\Rodrigo.julia\packages\Pardiso\yZsYO\deps\libpardiso600-WIN-X86-64.dll”, attempting to load it…
failed to load due to:
did not find libpardiso, assuming PARDISO 5/6 is not installed
I don't know if I need anything else besides the pardiso.lic and libpardiso600-WIN-X86-64.dll files.
Thanks

Using R package RJulia

I would like to install the R Package JuliaCall, to use Julia from R. I have installed Julia via snap and installed the JuliaCall R package form the Cran.
I received the following error when trying to use the setup function of JuliaCall.
library(JuliaCall)
julia <- julia_setup()
Julia version 1.0.4 at location /snap/julia/13/bin will be used.
Error in dyn.load(.julia$dll_file) :
unable to load shared object '/snap/julia/13/bin/../lib/libjulia.so.1':
/snap/julia/13/bin/../lib/libjulia.so.1: wrong ELF class: ELFCLASS32
Show Traceback
Rerun with Debug
Error in juliacall_initialize(.julia$dll_file) :
/snap/julia/13/bin/../lib/libjulia.so.1 - /snap/julia/13/bin/../lib/libjulia.so.1: wrong ELF class: ELFCLASS32
Julia is installed:
XRJulia::findJulia()
[1] "/snap/bin/julia"
I have tried some suggestions found in
https://github.com/Non-Contradiction/JuliaCall/issues/72
and even report my problems, but I'm not sure if this is an issue to open on Github or a problem with my installation.
The same error occurs
My system specifications are:
Ubuntu 18.04,
Rstudio 1.1.456,
R 3.5.1,
Julia installed via snap
Thanks for any help you could provide
Actually, the developer of JuliaCall answered my question.
I have installed Julia using snap without noticing that a 32bits version was used. Installing Julia from the .tar.gz archive and choosing the correct 64 bits version solve this problem.
Many Thanks to #Non-Contradiction.

Adding a package in Julia "ERROR The following package names could not be resolved"

When trying to add a package on Julia, I keep getting these message.
Pkg.add("Taro")
ERROR: The following package names could not be resolved:
* Taro (not found in project, manifest or registry)
Please specify by known `name=uuid`.
The warning only pops up when installing certain packages.
I have also tried to use:
get glone http://aviks.github.io/Taro.jl/ , but has not worked neither.
Thank you in advance for your help.
Rodrigo
The package is registered but doesn't seem to be ready for Julia 1.0.
You can (force) add it from it's github repository. It's located at https://github.com/aviks/Taro.jl. Hence, you can either
] add https://github.com/aviks/Taro.jl
or equivalently
using Pkg
Pkg.add("https://github.com/aviks/Taro.jl")
However, building the package will fail on Julia 1.0. Note that the URL that you mention, http://aviks.github.io/Taro.jl/, is only the packages documentation.

Resources