Help. New to Julia. Error using dev command

So I am trying to use replicate an example Dubin’s car problem (source:Danylo Malyuta Research Works) based on the SCP toolbox on github but I keep getting errors and I have been struggling to find the solution. Here is my workflow and where I am getting errors

$ 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 ../scp_traj_opt/solvers/
ERROR: Unable to parse `../scp_traj_opt/solvers/` as a package.
**# Here is my first error. I went ahead and verified the directory path to make sure it was correct. It appears the solvers algorithm is in src. So I made the change as below and still got an error.**
(scp_new_problem) pkg> dev C:\Users\aal\scp_traj_opt\src\solvers
ERROR: could not find project file in package at `C:\Users\aal\scp_traj_opt\src\solvers` maybe `subdir` needs to be specified
**# Here is my second error. I have been trying to figure this out for over 2 days. I will greatly appreciate if someone could tell me how to fix it. Even better if someone could try to replicate the tutorial at the link below to see if it still works with the version of Julia 1.6. Thank you in advance.
https://www.malyuta.name/optimization/tooling/2021/07/15/scp-tutorial.html**

That path does not exist, how about doing

dev ..

instead of

dev ../scp_traj_opt/solvers/

@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

From what I see of the package, you would instead want to run the following command:

dev ..\\scp_traj_opt

It looks like there may have been several packages (solvers, parser, utils) when the tutorial was created all combined into one.

@dkzwart I did that but got an error instead

(scp_new_problem) pkg> dev ..\\scp_traj_opt
ERROR: `..\\scp_traj_opt` appears to be a local path, but directory does not exist

In Windows explorer, what is the relative path between scp_new_problem and scp_traj_opt on your computer?

@dkzwart Here is how it is

C:\Users\aal\scp_traj_opt\scp_new_problem

I went ahead and took the scp_new_problem out of the scp_traj_opt and it worked without errors. Thank you
However, when I precompile, I got the errors below. Its seems like SCPToolbox has some dependency issue but can’t figure how to fix that.

...
(scp_new_problem) pkg> precompile
Precompiling project...
  ✗ SCPToolbox
  1 dependency successfully precompiled in 53 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

Looks like an internet problem??

HTTP errors are often intermittent, and a simple retry will get you on your way.

If that doesn’t work, there are other troubleshooting idea in the error message we can work through

@dkzwart I was able to some how get past the precompile error. I think my path had some issues. However, now when trying to execute using the “include” command I got the errors below. I attempted to import the packages as the error said but got a new error that I am not sure how to go past it.

> git clone https://github.com/UW-ACL/SCPToolbox.jl.git
> julia
(@v1.6) pkg> generate scp_new_problem 
(@v1.6) pkg> cd scp_new_problem 
(@v1.6) pkg> activate .
(scp_new_problem) pkg> dev ..//SCPToolbox.jl
(scp_new_problem) pkg> precompile
shell> cd src/
julia> include("scp_new_problem.jl");
ERROR: LoadError: LoadError: ArgumentError: Package Solvers not found in current path:
- Run `import Pkg; Pkg.add("Solvers")` to install the Solvers package.

Stacktrace:
 [1] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:893
 [2] include(mod::Module, _path::String)
   @ Base .\Base.jl:384
 [3] include(x::String)
   @ Main.scp_new_problem C:\Users\aal\scp_new_problem\src\scp_new_problem.jl:1
 [4] top-level scope
   @ C:\Users\aal\scp_new_problem\src\scp_new_problem.jl:2
 [5] include(fname::String)
   @ Base.MainInclude .\client.jl:444
 [6] top-level scope
   @ REPL[10]:1
in expression starting at C:\Users\aal\scp_new_problem\src\my_problem.jl:1
in expression starting at C:\Users\aal\scp_new_problem\src\scp_new_problem.jl:1

julia> import Pkg; Pkg.add("Solvers")
    Updating registry at `C:\Users\aal\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
 * Solvers (not found in project, manifest or registry)

Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
  [2] ensure_resolved(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; registry::Bool)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:883
  [3] 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:193
  [4] 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
  [5] 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
  [6] #add#23
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
  [7] add
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
  [8] #add#22
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [inlined]
  [9] add(pkg::String)
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75
 [10] top-level scope
    @ REPL[11]:1

julia>

You have code in scp_new_problem.jl?