@GHTaarn it worked using dev … . However, when trying to precompile, I got new errors. I’m not sure exactly what is going on. Any idea of what I’m doing wrong? or the tutorial on that website is just broken?
$ git clone https://github.com/dmalyuta/scp_traj_opt
Cloning into 'scp_traj_opt'...
remote: Enumerating objects: 3284, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (16/16), done.
Receiving objects: 100% (3284/3284), 1.50 MiB | 4.63 MiB/s, done.
remote: Total 3284 (delta 40), reused 31 (delta 31), pack-reused 3237
Resolving deltas: 100% (2344/2344), done.
$ cd scp_traj_opt
$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master
---------------------------------------------------------------------
$ julia
(@v1.6) pkg> generate scp_new_problem
Generating project scp_new_problem:
scp_new_problem\Project.toml
scp_new_problem\src/scp_new_problem.jl
shell> cd scp_new_problem
C:\Users\aal\scp_traj_opt\scp_new_problem
(@v1.6) pkg> activate .
Activating environment at `C:\Users\aal\scp_traj_opt\scp_new_problem\Project.toml`
...
(scp_new_problem) pkg> dev ..
Resolving package versions...
Updating `C:\Users\aal\scp_traj_opt\scp_new_problem\Project.toml`
[bd2bc758] + SCPToolbox v1.0.0 `..`
Updating `C:\Users\aal\scp_traj_opt\scp_new_problem\Manifest.toml`
...
(scp_new_problem) pkg> precompile
Precompiling project...
✗ SCPToolbox
1 dependency successfully precompiled in 28 seconds. 58 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
SCPToolbox [bd2bc758-a5dc-11eb-050f-6b2434548817]
Failed to precompile SCPToolbox [bd2bc758-a5dc-11eb-050f-6b2434548817] to C:\Users\aal\.julia\compiled\v1.6\SCPToolbox\jl_75F2.tmp.
[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/win-64/sip-6.7.7-py310h00ffb61_0.conda>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
...
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ERROR: LoadError: LoadError: LoadError: InitError: failed process: ....
....
caused by: PyError (PyImport_ImportModule
The Python package matplotlib could not be imported by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.
PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the matplotlib module, you can
use `pyimport_conda("matplotlib", PKG)`, where PKG is the Anaconda
package that contains the module matplotlib, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).
Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.
) <class 'ModuleNotFoundError'>
ModuleNotFoundError("No module named 'matplotlib'")
Stacktrace:
[1] pyimport(name::String)
@ PyCall C:\Users\aal\.julia\packages\PyCall\twYvK\src\PyCall.jl:558
[2] pyimport_conda(modulename::String, condapkg::String, channel::String)
@ PyCall C:\Users\aal\.julia\packages\PyCall\twYvK\src\PyCall.jl:716
[3] pyimport_conda
@ C:\Users\aal\.julia\packages\PyCall\twYvK\src\PyCall.jl:715 [inlined]
[4] __init__()
@ PyPlot C:\Users\aal\.julia\packages\PyPlot\H01LC\src\init.jl:173
[5] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base .\loading.jl:696
[6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base .\loading.jl:782
[7] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1020
[8] require(uuidkey::Base.PkgId)
@ Base .\loading.jl:936
[9] require(into::Module, mod::Symbol)
@ Base .\loading.jl:923
[10] include(mod::Module, _path::String)
@ Base .\Base.jl:384
[11] include(x::String)
@ SCPToolbox.Utils C:\Users\aal\scp_traj_opt\src\utils\utils.jl:19
[12] top-level scope
@ C:\Users\aal\scp_traj_opt\src\utils\utils.jl:52
[13] include(mod::Module, _path::String)
@ Base .\Base.jl:384
[14] include(x::String)
@ SCPToolbox C:\Users\aal\scp_traj_opt\src\SCPToolbox.jl:19
[15] top-level scope
@ C:\Users\aal\scp_traj_opt\src\SCPToolbox.jl:21
[16] include
@ .\Base.jl:384 [inlined]
[17] 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:1235
[18] top-level scope
@ none:1
[19] eval
@ .\boot.jl:360 [inlined]
[20] eval(x::Expr)
@ Base.MainInclude .\client.jl:446
[21] top-level scope
@ none:1
shell> cd src/
C:\Users\aal\scp_traj_opt\scp_new_problem\src
**julia> include("scp_new_problem.jl");**
ERROR: LoadError: SystemError: opening file "C:\\Users\\aal\\scp_traj_opt\\scp_new_problem\\src\\my_problem.jl": No such file or directory
Stacktrace:
[1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
@ Base .\error.jl:168
[2] #systemerror#62
@ .\error.jl:167 [inlined]
[3] systemerror
@ .\error.jl:167 [inlined]
[4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
@ Base .\iostream.jl:293
[5] open
@ .\iostream.jl:282 [inlined]
[6] open(f::Base.var"#326#327"{String}, args::String; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Base .\io.jl:328
[7] open
@ .\io.jl:328 [inlined]
[8] read
@ .\io.jl:434 [inlined]
[9] _include(mapexpr::Function, mod::Module, _path::String)
@ Base .\loading.jl:1166
[10] include(mod::Module, _path::String)
@ Base .\Base.jl:384
[11] include(x::String)
@ Main.scp_new_problem C:\Users\aal\scp_traj_opt\scp_new_problem\src\scp_new_problem.jl:1
[12] top-level scope
@ C:\Users\aal\scp_traj_opt\scp_new_problem\src\scp_new_problem.jl:2
[13] include(fname::String)
@ Base.MainInclude .\client.jl:444
[14] top-level scope
@ REPL[7]:1
in expression starting at C:\Users\aal\scp_traj_opt\scp_new_problem\src\scp_new_problem.jl:1