Skip to content

Instantly share code, notes, and snippets.

@meggart
Created September 25, 2015 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meggart/d2223388e5bd9574e7ba to your computer and use it in GitHub Desktop.
Save meggart/d2223388e5bd9574e7ba to your computer and use it in GitHub Desktop.
"Get the exact version of a package."
function version(name::AbstractString)
packages = JSON.parse(readall(`$conda list --json`))
for package in packages
if startswith(package, name)
return package
end
end
warn("Could not find the $name package")
return "Not found"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment