How to add a package directly from github to Julia?

Viewed 847

I am getting an Unsatisfiable requirements while importing the latest github release of the Geostats package in Julia (Editor - Atom). TO avoid any clashes between the packages, I am using virtual environment.

(Virtualenv) pkg> add https://github.com/JuliaEarth/GeoStats.jl.git
    Cloning git-repo `https://github.com/JuliaEarth/GeoStats.jl.git`
   Updating git-repo `https://github.com/JuliaEarth/GeoStats.jl.git`
   Updating registry at `C:\Users\User\.julia\registries\General`
   Updating registry at `C:\Users\User\.julia\registries\JuliaComputingRegistry`
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Variography [04a0146e]:
 Variography [04a0146e] log:
 ├─possible versions are: [0.2.0-0.2.2, 0.3.0-0.3.7, 0.4.0-0.4.3, 0.5.0-0.5.10, 0.6.0-0.6.3, 0.7.0, 0.8.0-0.8.4, 0.9.0-0.9.1, 0.10.0-0.10.4, 0.11.0-0.11.1] or uninstalled
 └─restricted to versions 0.12 by GeoStats [dcc97b0b] — no versions left
   └─GeoStats [dcc97b0b] log:
     ├─possible versions are: 0.23.0 or uninstalled
     └─GeoStats [dcc97b0b] is fixed to version 0.23.0

Firstly, I would like to know is this the correct approach or syntax to import a package directly from github? And how may i resolve this issue of unsatisfiable conditions?

Thanks!

3 Answers

To answer your original question specifically, doing add https://the_girhub_clone_url will add a package directly from GitHub.

There's also documentation on how to understand and resolve package conflicts. It's complicated the first time you work through it, but it's a life-skill worth learning :-).

In your case the problem is that Variography version compatible with your Geostats was released just few hours before and your package manager has not updated its version cache yet.

Try running:

pkg"update Variography"

Your Julia will become aware of new Variography and you will be able to install the lastest Geostats.

However if it is going to keep failing due to some other dependencies just downgrade Geostats:

pkg"add GeoStats@v0.22.0"
Related