Julia unusable because of Grisu dependency - package

I just installed the latest fresh Julia (1.7.3). Afterwards I installed some packages for optimization.
Inbetween Julia started to report an unresolvable dependency on package Grisu. Now a lot of the installed packaged don't work:
ERROR: LoadError: UndefVarError: Grisu not defined
What problem is this with Julia? Do I need to un- and reinstall the entire Julia system or is there a workaround for this? I don't need Grisu but packages that depend on Grisu.
I also tried to remove the packages that don't compile (to reinstall afterwards), e.g.
julia> Pkg.rm("JuMP")
ERROR: The following package names could not be resolved:
* JuMP (4076af6c-e467-56ae-b986-b466b2749572 in manifest but not in project)
but after
julia> Pkg.precompile()
I get
julia> Pkg.precompile()
Precompiling project...
✗ Interpolations
✗ JuMP
✗ Alpine
✗ JuMPeR
✗ Pajarito
✗ MultiJuMP
✗ NLOptControl
so the package JuMP (e.g.) is still there and failes to compile.
What is wrong here?
EDIT:
julia> Pkg.build()
Building GR ───────→ `C:\Users\Michael\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\7ea6f715b7caa10d7ee16f1cfcd12f3ccc74116a\build.log`
Building Conda ────→ `C:\Users\Michael\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\6e47d11ea2776bc5627421d59cdcc1296c058071\build.log`
Building IJulia ───→ `C:\Users\Michael\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\98ab633acb0fe071b671f6c1785c46cd70bb86bd\build.log`
Building OptimPack → `C:\Users\Michael\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\6c8a57b7abf98250755764fe49138781c09d6826\build.log`
Building Plots ────→ `C:\Users\Michael\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\f226ff9b8e391f6a10891563c370aae8beb5d792\build.log`
Precompiling project...
✗ NLOptControl
1 dependency successfully precompiled in 35 seconds (224 already precompiled, 5 skipped during auto due to previous errors)
1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
julia> import Pkg; Pkg.precompile()
Precompiling project...
✗ JuMP
✗ Alpine
✗ JuMPeR
✗ Pajarito
✗ MultiJuMP
✗ NLOptControl
0 dependencies successfully precompiled in 11 seconds (225 already precompiled)
ERROR: The following 5 direct dependencies failed to precompile:
Pajarito [2f354839-79df-5901-9f0a-cdb2aac6fe30]
Failed to precompile Pajarito [2f354839-79df-5901-9f0a-cdb2aac6fe30] to C:\Users\Michael\.julia\compiled\v1.7\Pajarito\jl_3088.tmp.
ERROR: LoadError: UndefVarError: Grisu not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
# Base .\Base.jl:35
[2] top-level scope
# C:\Users\Michael\.julia\packages\JuMP\I7whV\src\writers.jl:6
[3] include(mod::Module, _path::String)
# Base .\Base.jl:418
[4] include(x::String)
# JuMP C:\Users\Michael\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
[5] top-level scope
# C:\Users\Michael\.julia\packages\JuMP\I7whV\src\JuMP.jl:947
[6] include
# .\Base.jl:418 [inlined]
[7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
# Base .\loading.jl:1318
[8] top-level scope
# none:1
[9] eval
# .\boot.jl:373 [inlined]
[10] eval(x::Expr)
# Base.MainInclude .\client.jl:453
[11] top-level scope
# none:1
in expression starting at C:\Users\Michael\.julia\packages\JuMP\I7whV\src\writers.jl:5
in expression starting at C:\Users\Michael\.julia\packages\JuMP\I7whV\src\JuMP.jl:11
EDIT 2:
After removing .julia and reinstalling JuMPeR and MultiJuMP the same happend. The later caused the following:
Updating `C:\Users\Michael\.julia\environments\v1.7\Project.toml`
[07493b3f] ↓ Alpine v0.4.1 ⇒ v0.1.15
[4076af6c] ↓ JuMP v1.1.1 ⇒ v0.18.6
[f6097e2c] + MultiJuMP v0.5.0
[2f354839] ↓ Pajarito v0.8.0 ⇒ v0.7.0
Updating `C:\Users\Michael\.julia\environments\v1.7\Manifest.toml`
[07493b3f] ↓ Alpine v0.4.1 ⇒ v0.1.15
[6e4b80f9] - BenchmarkTools v1.3.1
[523fee87] - CodecBzip2 v0.7.2
[944b1d66] - CodecZlib v0.7.0
[861a8166] + Combinatorics v0.7.0
[34da2185] ↓ Compat v4.1.0 ⇒ v2.2.1
[e95a7839] + ConicBenchmarkUtilities v0.4.0
[864edb3b] ↓ DataStructures v0.18.13 ⇒ v0.17.20
[92fee26a] + GZip v0.5.1
[682c06a0] - JSON v0.21.3
[4076af6c] ↓ JuMP v1.1.1 ⇒ v0.18.6
[b964fa9f] + LaTeXStrings v1.3.0
[b8f27783] - MathOptInterface v1.6.0
[fdba3010] + MathProgBase v0.7.8
[f6097e2c] + MultiJuMP v0.5.0
[d8a4904e] - MutableArithmetics v1.0.4
[77ba4419] ↓ NaNMath v1.0.1 ⇒ v0.3.7
[2f354839] ↓ Pajarito v0.8.0 ⇒ v0.7.0
[69de0a69] - Parsers v2.3.2
[f27b6e38] + Polynomials v0.6.1
[3cdcf5f2] + RecipesBase v0.8.0
[89212889] + ReverseDiffSparse v0.8.6
[3bb67fe8] - TranscodingStreams v0.9.6
[6e34b625] - Bzip2_jll v1.0.8+0
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[9abbd945] - Profile
[1a1011a3] + SharedArrays
Precompiling project...
✗ JuMP
✗ Alpine
✗ Pajarito
✗ MultiJuMP
Afterwards it is not possible to repair the packages, even by uninstalling the problematic packages.

The Grisu.jl package has no specific dependencies so there is rather no way how you could have some problems with it.
What usually helps is rebuilding the packages:
using Pkg
Pkg.build()
In most cases that will align everything back in order.
Sometimes on very rare occasions the Julia package repository gets corrupted (especially if you press Ctrl+C in the middle of package installation and have bad luck) and in that case you will need to delete the .julia folder (which is located in your home directory)

Related

Unsatisfiable requirements detected for package Compat during Pkg.add("DataFrameMacros")

I am adding package "DataFrameMacros". This results in error:
ERROR: Unsatisfiable requirements detected for package Compat [34da2185]:
Compat [34da2185] log:
├─possible versions are: 1.0.0-4.4.0 or uninstalled
├─restricted by compatibility requirements with DataFrames [a93c6f00] to versions: 3.17.0-4.4.0
│ └─DataFrames [a93c6f00] log:
│ ├─possible versions are: 0.11.7-1.4.3 or uninstalled
│ ├─restricted to versions * by an explicit requirement, leaving only versions 0.11.7-1.4.3
│ └─restricted by compatibility requirements with DataFrameMacros [75880514] to versions: 1.0.0-1.4.3
│ └─DataFrameMacros [75880514] log:
│ ├─possible versions are: 0.1.0-0.4.0 or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.4.0
└─restricted by compatibility requirements with Format [1fa38f19] to versions: 1.0.0-2.2.1 — no versions left
└─Format [1fa38f19] log:
├─possible versions are: 0.7.0-1.3.2 or uninstalled
└─restricted by compatibility requirements with BioStructures [de9282ab] to versions: 0.7.0-0.8.0
└─BioStructures [de9282ab] log:
├─possible versions are: 0.3.0-1.2.1 or uninstalled
└─restricted by compatibility requirements with Bio [3637df68] to versions: 0.3.0-0.4.0
└─Bio [3637df68] log:
├─possible versions are: 1.0.0-1.0.1 or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions 1.0.0-1.0.1
Stacktrace:
[1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
# Pkg.Resolve ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1063
[2] propagate_constraints! (repeats 2 times)
# ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1000 [inlined]
[3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
# Pkg.Resolve ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1519
[4] simplify_graph! (repeats 2 times)
# ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1519 [inlined]
[5] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
# Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:335
[6] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
# Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1154
[7] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
# Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1139
[8] _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
# Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1160
[9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
# Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1176
[10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
# Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:268
[11] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
# Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:149
[12] add(pkgs::Vector{Pkg.Types.PackageSpec})
# Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:144
[13] #add#27
# ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
[14] add
# ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
[15] #add#26
# ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
[16] add(pkg::String)
# Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:141
[17] top-level scope
# REPL[1]:1
My packages status:
(#v1.7) pkg> status
Status `~/.julia/environments/v1.7/Project.toml`
[3637df68] Bio v1.0.1
[336ed68f] CSV v0.8.5
[159f3aea] Cairo v1.0.5
[8be319e6] Chain v0.5.0
[a93c6f00] DataFrames v0.21.8
[31c24e10] Distributions v0.25.45
[186bb1d3] Fontconfig v0.4.0
[c91e804a] Gadfly v1.3.4
[7073ff75] IJulia v1.23.2
[429524aa] Optim v0.15.3
[438e738f] PyCall v1.93.0
[d330b81b] PyPlot v2.10.0
[2913bbd2] StatsBase v0.33.14
[88034a9c] StringDistances v0.11.2
[10745b16] Statistics
I have read here Julia "Unsatisfiable requirements detected for package" error when installing multiple packages on how to read the status conflict error. It seems that Compat requires a newer DataFrame version than DataFrameMacros I am trying to install.
So Campat and DataFrameMacros seem to be incompatible.
However, I don't know where Compat came into play as I only try to install DataFrameMacros.
The packages I actually need for the code I am running are:
using PyPlot
using CSV
using DataFrames
using StatsBase
using PyCall
using Cairo
using Fontconfig
using Distributions
using DataFrameMacros, Chain
using Optim
Does anyone have a suggestion of how I can solve the error and install DataFrameMacros?
The problem is ultimately due to Bio.jl - note that Bio.jl is deprecated, and the Github page archived. There's a blog post that unambiguously says:
It is not longer recommended that you use Bio.jl.
and gives the list of packages which have the functionality Bio.jl used to have. You can choose which of those to install based on what features of it you needed. Or if your list of "packages I actually need" is complete, it seems you don't need Bio.jl at all. In that case, you can just rm Bio and add DataFrameMacros instead.
This sort of issue is likely to arise again if you install everything in the default Julia environment #v1.7. I'd recommend that you instead do ] activate /your/project/folder (in the Julia REPL) to create a new environment there, and add the just packages you need for this project there. That will keep your projects from stepping on each other's toes and make conflicts like this less likely.

Can't add DifferentialEquation.jl to Julia 1.7.0

I recently went from Julia 1.6.3 to 1.7.0. I copied the Manifest and the Project.toml files to the new environments folder and updated the Manifest file to the newer version according to instructions. Everything worked fine. However, when I later tried to add DifferentialEquations.jl I got this error:
(#v1.7) pkg> precompile
Precompiling project...
✗ DiffEqNoiseProcess
✗ DiffEqFinancial
✗ StochasticDiffEq
✗ MultiScaleArrays
✗ DifferentialEquations
0 dependencies successfully precompiled in 30 seconds (252 already precompiled)
ERROR: The following 2 direct dependencies failed to precompile:
DiffEqNoiseProcess [77a26b50-5914-5dd7-bc55-306e6241c503]
Failed to precompile DiffEqNoiseProcess [77a26b50-5914-5dd7-bc55-306e6241c503] to C:\Users\*user*\.julia\compiled\v1.7\DiffEqNoiseProcess\jl_F949.tmp.
WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:fourinvπ}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **
WARNING: Method definition Type##kw(Any, Type{Base.MPFR.BigFloat}, Base.Irrational{:twoinvπ}) in module StatsFuns at irrationals.jl:182 overwritten in module IrrationalConstants on the same line (check for duplicate calls to `include`).
** incremental compilation may be fatally broken for this module **
...
It continues with similar warnings for a while and finally I get this:
ERROR: LoadError: UndefVarError: SciMLBase not defined
Stacktrace:
[1] top-level scope
# C:\Users\manfr\.julia\packages\DiffEqNoiseProcess\9NzQP\src\solve.jl:1
[2] include(mod::Module, _path::String)
# Base .\Base.jl:418
[3] include(x::String)
# DiffEqNoiseProcess C:\Users\manfr\.julia\packages\DiffEqNoiseProcess\9NzQP\src\DiffEqNoiseProcess.jl:1
[4] top-level scope
# C:\Users\manfr\.julia\packages\DiffEqNoiseProcess\9NzQP\src\DiffEqNoiseProcess.jl:23
[5] include
# .\Base.jl:418 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String},
dl_load_path::Vector{String}, load_path::Vector{String},
concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
# Base .\loading.jl:1318
[7] top-level scope
# none:1
[8] eval
# .\boot.jl:373 [inlined]
[9] eval(x::Expr)
# Base.MainInclude .\client.jl:453
[10] top-level scope
# none:1
in expression starting at
C:\Users\manfr\.julia\packages\DiffEqNoiseProcess\9NzQP\src\solve.jl:1
in expression starting at C:\Users\manfr\.julia\packages\DiffEqNoiseProcess\9NzQP\src\DiffEqNoiseProcess.jl:1
ERROR: LoadError: Failed to precompile DiffEqNoiseProcess [77a26b50-5914-5dd7-bc55-
306e6241c503] to C:\Users\manfr\.julia\compiled\v1.7\DiffEqNoiseProcess\jl_5956.tmp.
Stacktrace:
[1] error(s::String)
# Base .\error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO,
ignore_loaded_modules::Bool)
# Base .\loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
# Base .\loading.jl:1410
[4] _require(pkg::Base.PkgId)
# Base .\loading.jl:1120
[5] require(uuidkey::Base.PkgId)
# Base .\loading.jl:1013
[6] require(into::Module, mod::Symbol)
# Base .\loading.jl:997
[7] include
# .\Base.jl:418 [inlined]
[8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String},
dl_load_path::Vector{String}, load_path::Vector{String},
concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
# Base .\loading.jl:1318
[9] top-level scope
# none:1
[10] eval
# .\boot.jl:373 [inlined]
[11] eval(x::Expr)
# Base.MainInclude .\client.jl:453
[12] top-level scope
# none:1
in expression starting at
C:\Users\manfr\.julia\packages\DifferentialEquations\el96s\src\DifferentialEquations.jl:1
I've tried to build, precompile, delete the package folder and add it again, but nothing seems to work. I also tried to add the package to my Julia 1.6.3 installation, and that works fine. Does anyone know what the problem could be?
Manifests are version specific (since package versions can be Julia version specific). Re-resolve your packages without the manifest.

JULIA 1.6.4 ERROR: Unable to automatically install 'OpenSpecFun'

I am trying to add the package "Distributions" (and others):
(#v1.6) pkg> add Distributions
And I get:
ERROR: Unable to automatically install 'OpenSpecFun' from 'C:\Users\cescalac\.julia\packages\OpenSpecFun_jll\1Zaof\Artifacts.toml'
Stacktrace:
[1] error(s::String)
# Base .\error.jl:33
[2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
# Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:445
[3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool, io::Base.TTY)
# Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:510
[4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool, io::Base.TTY)
# Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:710
[5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
# Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:687
[6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Vector{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
# Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1242
[7] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
# Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:204
[8] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
# Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:80
[9] add(pkgs::Vector{Pkg.Types.PackageSpec})
# Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:78
[10] #add#23
# C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[11] add
# C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[12] #add#22
# C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [inlined]
[13] add(pkg::String)
# Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75
[14] top-level scope
# REPL[1]:1
I uninstall everything, install again. The error persists. Thank you in advance if you can help me with the solution. Julia version 1.6.4.
With ENV["JULIA_DEBUG"]="all", I get
julia> Pkg.add("Distributions")
Resolving package versions...
Downloading artifact: OpenSpecFun
┌ Debug: download_artifact error
│ tree_hash = SHA1("3e683ec5ca945a5aca74c49e8cccdf37c19b84a3")
│ tarball_url = "https://pkg.julialang.org/artifact/3e683ec5ca945a5aca74c49e8cccdf37c19b84a3"
│ tarball_hash = nothing
│ err = HTTP/1.1 403 MediaTypeBlocked while requesting https://pkg.julialang.org/artifact/3e683ec5ca945a5aca74c49e8cccdf37c19b84a3
Downloaded artifact: OpenSpecFun
Downloading artifact: OpenSpecFun
┌ Debug: download_artifact error
│ tree_hash = SHA1("3e683ec5ca945a5aca74c49e8cccdf37c19b84a3")
│ tarball_url = "https://github.com/JuliaBinaryWrappers/OpenSpecFun_jll.jl/releases/download/OpenSpecFun-v0.5.5+0/OpenSpecFun.v0.5.5.x86_64-w64-mingw32-libgfortran5.tar.gz"
│ tarball_hash = "56018ef016338b838d407cd58ffb7033584dd78c31b9d1082cdae10556a902cd"
│ err = HTTP/1.1 403 MediaTypeBlocked while requesting https://github.com/JuliaBinaryWrappers/OpenSpecFun_jll.jl/releases/download/OpenSpecFun-v0.5.5+0/OpenSpecFun.v0.5.5.x86_64-w64-mingw32-libgfortran5.tar.gz
Downloaded artifact: OpenSpecFun
(pasting my comments as an answer since this seems likely to be the issue.)
The output of ENV["JULIA_DEBUG"]="all" (which makes Artifacts print more detailed errors) indicates that it's a problem with downloading the artifact file.
│ err = HTTP/1.1 403 MediaTypeBlocked while requesting https://github.com/JuliaBinaryWrappers/OpenSpecFun_jll.jl/releases/download/OpenSpecFun-v0.5.5+0/OpenSpecFun.v0.5.5.x86_64-w64-mingw32-libgfortran5.tar.gz
MediaTypeBlocked in this case (since the link works for the rest of us) indicates that this is likely a firewall/proxy in your network that's blocking these files from being downloaded. You'll likely encounter the same error with any attempt to access these files, for eg. from a browser or with wget.
Changing the network config to allow these files would be the best course of action (and disallowing tar.gz files seems overly restrictive anyway). In case you're not able to do that, you can download the file from a different network and copy it to the place the artifacts mechanism would have placed it in, which would also allow this package installation to continue.

fbt internationalization: ERROR in ./src/example/Example.react.js Module not found: Error: Can't resolve 'fbt'

I try to use new internationalization library from facebook - fbt, I follow by steps in doc:
git clone git#github.com:facebookincubator/fbt.git;
cd fbt/demo-app;
yarn install; # pull in dependencies
yarn manifest; # generate fbt enum manifests and source manifests
yarn collect-fbts; # Collect all fbt phrases from source
yarn translate-fbts; # Generate the translation payloads
yarn build;
yarn start; # Checkout your locally running server at localhost:8081
And in next I got next error on yarn build step:
ERROR in ./src/example/Example.react.js
Module not found: Error: Can't resolve 'fbt' in '/home/test/projects/fbt/demo-app/src/example'
# ./src/example/Example.react.js 36:0-80 37:0-4 100:17-31 104:18-29 113:6-23 141:9-12 143:43-46 145:43-46 159:10-27 164:15-29 165:9-12 168:15-29 169:9-12 172:15-29 173:9-12 176:15-29 177:9-12 185:21-24 198:21-24 219:15-29 220:9-12 223:15-29 224:9-12 227:15-29 228:9-12 231:15-29 232:9-12 236:9-12 238:10-13 240:58-61 243:9-12 246:10-13 256:21-24 289:15-26 290:9-12 293:15-26 294:9-12 297:15-26 298:9-12 301:15-26 302:9-12 305:15-26 306:9-12 309:15-26 310:9-12 314:9-12 340:10-13 344:32-35 344:78-81 346:9-12 346:27-30 348:9-12 352:12-15 362:9-12
# ./src/root.js
My apologies! It looks like we were missing a step in our documentation! You'll need to run yarn in the top-level first (to build the runtime library):
git clone git#github.com:facebookincubator/fbt.git;
cd fbt;
yarn;
cd demo-app
yarn ...

Cannot use FITSIO in Julia

I just started using Julia and installed the FITSIO package. When loading it I get the following error
julia> using FITSIO
[ Info: Precompiling FITSIO [525bcba6-941b-5504-bd06-fd0dc1a4d2eb]
ERROR: LoadError: syntax: extra token "ImageHDU" after end of expression
Stacktrace:
[1] include at .\boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at .\loading.jl:1038
[3] include(::Module, ::String) at .\sysimg.jl:29
[4] top-level scope at none:2
[5] eval at .\boot.jl:319 [inlined]
[6] eval(::Expr) at .\client.jl:389
[7] top-level scope at .\none:3
in expression starting at C:\Users\romain\.julia\packages\FITSIO\WueGk\src\FITSIO.jl:54
ERROR: Failed to precompile FITSIO [525bcba6-941b-5504-bd06-fd0dc1a4d2eb] to C:\Users\romain\.julia\compiled\v1.0\FITSIO\mbga9.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] macro expansion at .\logging.jl:313 [inlined]
[3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1184
[4] macro expansion at .\logging.jl:311 [inlined]
[5] _require(::Base.PkgId) at .\loading.jl:941
[6] require(::Base.PkgId) at .\loading.jl:852
[7] macro expansion at .\logging.jl:311 [inlined]
[8] require(::Module, ::Symbol) at .\loading.jl:834
I tried to remove and add again the FITSIO package, but I always get the same error. The stacktrace seems to go to line 54 of FITSIO.jl So here is the content of this file from line 46 to 57
import .Libcfitsio: libcfitsio,
fits_assert_ok,
fits_assert_isascii,
TYPE_FROM_BITPIX
# HDU Types
#compat abstract type HDU end
type ImageHDU <: HDU
fitsfile::FITSFile
ext::Int
end
Do you know how to make this package work?
Thanks :)
Here is the answer from the FITSIO developers:
The latest stable version of this package isn't compatible with Julia
1.0. This has been already fixed in the development version, but we haven't tagged a new version since then.
Remove FITSIO.jl with
pkg> rm FITSIO
pkg> update
pkg> add FITSIO
pkg> dev FITSIO
After the rm, make sure you don't have any FITSIO.jl leftover, then
you can reinstall and switch to the development version within the
package manager, without installing another package
It appears that Julia automatically fetched the wrong package with
add FITSIO
I solved the problem by forcing the download URL to be
add https://github.com/JuliaAstro/FITSIO.jl

Resources