OpticSim.jl
OpticSim.jl copied to clipboard
Perhaps mention in OpticSim docs that python distro path needs to be set before starting installation?
Describe the bug
Not a bug. Julia Newbie here. Wanted to test out OpticSim but the installation kept erroring while installing PyCall and Conda. After a lot of trial and error and reinstalling, found out that the python path is required by certain packages. So I am assuming that certain packages in Julia are dependent on python or minforge also, perhaps?
To Reproduce
(v1.7) pkg> add PyCall
Expected behavior should install successfully.
Screenshots
(v1.7) pkg> add PyCall
Installing known registries into `c:\users\fw\julia\.julia`
Updating registry at `c:\users\fw\julia\.julia\registries\General.toml`
Resolving package versions...
Installed Conda ────────── v1.7.0
Installed VersionParsing ─ v1.3.0
Installed MacroTools ───── v0.5.9
Installed Parsers ──────── v2.3.2
Installed JSON ─────────── v0.21.3
Installed PyCall ───────── v1.93.1
Updating `c:\users\fw\julia\.julia\environments\v1.7\Project.toml`
[438e738f] + PyCall v1.93.1
Updating `c:\users\fw\julia\.julia\environments\v1.7\Manifest.toml`
[8f4d0f93] + Conda v1.7.0
[682c06a0] + JSON v0.21.3
[1914dd2f] + MacroTools v0.5.9
[69de0a69] + Parsers v2.3.2
[438e738f] + PyCall v1.93.1
[81def892] + VersionParsing v1.3.0
[0dad84c5] + ArgTools
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[f43a241f] + Downloads
[b27032c2] + LibCURL
[37e2e46d] + LinearAlgebra
[d6f4376e] + Markdown
[a63ad114] + Mmap
[ca575930] + NetworkOptions
[de0858da] + Printf
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll
[deac9b47] + LibCURL_jll
[29816b5a] + LibSSH2_jll
[c8ffd9c3] + MbedTLS_jll
[14a3606d] + MozillaCACerts_jll
[4536629a] + OpenBLAS_jll
[83775a58] + Zlib_jll
[8e850b90] + libblastrampoline_jll
[8e850ede] + nghttp2_jll
Building Conda ─→ `c:\users\fw\julia\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\6e47d11ea2776bc5627421d59cdcc1296c058071\build.log`
Building PyCall → `c:\users\fw\julia\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\1fc929f47d7c151c839c5fc1375929766fb8edcc\build.log`
ERROR: Error building `PyCall`:
┌ Info: Using the Python distribution in the Conda package by default.
└ To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").
[ Info: Downloading miniconda installer ...
ERROR: LoadError: HTTP/1.1 200 OK (Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds) while requesting https://github.com/conda-forge/mi
niforge/releases/latest/download/Miniforge3-Windows-x86_64.exe
Stacktrace:
[1] (::Downloads.var"#9#18"{IOStream, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool})(easy::D
ownloads.Curl.Easy)
@ Downloads c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:387
[2] with_handle(f::Downloads.var"#9#18"{IOStream, Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bo
ol}, handle::Downloads.Curl.Easy)
@ Downloads.Curl c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Curl\Curl.jl:88
[3] #8
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:328 [inlined]
[4] arg_write(f::Downloads.var"#8#17"{Base.DevNull, Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Bool, String, Bool, Bool}, arg::IO
Stream)
@ ArgTools c:\users\fw\julia\share\julia\stdlib\v1.7\ArgTools\src\ArgTools.jl:112
[5] #7
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:327 [inlined]
[6] arg_read
@ c:\users\fw\julia\share\julia\stdlib\v1.7\ArgTools\src\ArgTools.jl:61 [inlined]
[7] request(url::String; input::Nothing, output::IOStream, method::Nothing, headers::Vector{Pair{String, String}}, timeout::Float64, progress::Nothing, verbos
e::Bool, debug::Nothing, throw::Bool, downloader::Nothing)
@ Downloads c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:326
[8] #3
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:231 [inlined]
[9] open(f::Downloads.var"#3#4"{Nothing, Vector{Pair{String, String}}, Float64, Nothing, Bool, Nothing, Nothing, String}, args::String; kwargs::Base.Pairs{Sym
bol, Bool, Tuple{Symbol}, NamedTuple{(:write,), Tuple{Bool}}})
@ Base .\io.jl:330
[10] arg_write(f::Function, arg::String)
@ ArgTools c:\users\fw\julia\share\julia\stdlib\v1.7\ArgTools\src\ArgTools.jl:86
[11] #download#2
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:230 [inlined]
[12] download
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Downloads\src\Downloads.jl:230 [inlined]
[13] _install_conda(env::String, force::Bool)
@ Conda c:\users\fw\julia\.julia\packages\Conda\x2UxR\src\Conda.jl:201
[14] _install_conda(env::String)
@ Conda c:\users\fw\julia\.julia\packages\Conda\x2UxR\src\Conda.jl:191
[15] runconda(args::Cmd, env::String)
@ Conda c:\users\fw\julia\.julia\packages\Conda\x2UxR\src\Conda.jl:126
[16] add(pkg::String, env::String; channel::String)
@ Conda c:\users\fw\julia\.julia\packages\Conda\x2UxR\src\Conda.jl:222
[17] add (repeats 2 times)
@ c:\users\fw\julia\.julia\packages\Conda\x2UxR\src\Conda.jl:221 [inlined]
[18] top-level scope
@ c:\users\fw\julia\.julia\packages\PyCall\7a7w0\deps\build.jl:79
[19] include(fname::String)
@ Base.MainInclude .\client.jl:451
[20] top-level scope
@ none:5
in expression starting at c:\users\fw\julia\.julia\packages\PyCall\7a7w0\deps\build.jl:43
After setting the python and restarting julia, it ended up with one more error and finally installed!
(v1.7) pkg> add PyCall
Updating registry at `c:\users\fw\julia\.julia\registries\General.toml`
Resolving package versions...
No Changes to `c:\users\fw\julia\.julia\environments\v1.7\Project.toml`
No Changes to `c:\users\fw\julia\.julia\environments\v1.7\Manifest.toml`
Precompiling project...
✗ PyCall
7 dependencies successfully precompiled in 4 seconds (4 already precompiled)
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...
✗ PyCall
0 dependencies successfully precompiled in 2 seconds (11 already precompiled)
ERROR: The following 1 direct dependency failed to precompile:
PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0]
Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to c:\users\fw\julia\.julia\compiled\v1.7\PyCall\jl_22A9.tmp.
ERROR: LoadError: PyCall not properly installed. Please run Pkg.build("PyCall")
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] top-level scope
@ c:\users\fw\julia\.julia\packages\PyCall\7a7w0\src\startup.jl:44
[4] include(x::String)
@ PyCall c:\users\fw\julia\.julia\packages\PyCall\7a7w0\src\PyCall.jl:1
[5] top-level scope
@ c:\users\fw\julia\.julia\packages\PyCall\7a7w0\src\PyCall.jl:38
[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_d
eps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ 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\fw\julia\.julia\packages\PyCall\7a7w0\src\startup.jl:41
in expression starting at c:\users\fw\julia\.julia\packages\PyCall\7a7w0\src\PyCall.jl:1
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types c:\users\fw\julia\share\julia\stdlib\v1.7\Pkg\src\Types.jl:68
[2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tu
ple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API c:\users\fw\julia\share\julia\stdlib\v1.7\Pkg\src\API.jl:1362
[3] precompile
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Pkg\src\API.jl:1013 [inlined]
[4] #precompile#220
@ c:\users\fw\julia\share\julia\stdlib\v1.7\Pkg\src\API.jl:1011 [inlined]
[5] precompile()
@ Pkg.API c:\users\fw\julia\share\julia\stdlib\v1.7\Pkg\src\API.jl:1011
Desktop (please complete the following information):
- OS: windows 10
- Julia version 1.7.3
- OpticSim.jl <didn't install properly>
Additional context
Although now I'm wondering whether it failed because I was offline and it could not download minforge.