jonathan-laurent / AlphaZero.jl

A generic, simple and fast implementation of Deepmind's AlphaZero algorithm.

Home Page:https://jonathan-laurent.github.io/AlphaZero.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble Installing from GitHub

Bobingstern opened this issue · comments

I'm relatively new to Julia so I apologise if this is a simple issue. Im trying to install the package using the instruction provided in the README and documentation. So far I have cloned the repository, cd'd into it and I'm trying to run the command
julia --project -e 'import Pkg; Pkg.instantiate()'
but I get the following error:

D:\Programming Projects\Julia Projects\AlphaZero\AlphaZero.jl>julia --project -e 'import Pkg; Pkg.instantiate()'
ERROR: syntax: incomplete: invalid character literal
Stacktrace:
 [1] top-level scope
   @ none:1

Im not sure what the problem is. Im using windows 10 with Julia version 1.8.5.

Try import Pkg; Pkg.instantiate() from Julia REPL?

It runs without error now but I still cant run AlphaZero with
using AlphaZero; Scripts.train("connect-four")
without getting the error

- Run `import Pkg; Pkg.add("AlphaZero")` to install the AlphaZero package.
Stacktrace:
 [1] macro expansion
   @ .\loading.jl:1163 [inlined]
 [2] macro expansion
   @ .\lock.jl:223 [inlined]
 [3] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:1144

Package loading is still a bit unclear to me.
What I usually do (the same can be done from Julia REPL if you have issues with quotes):

cd AlphaZero.jl/
julia --project -e 'import Pkg; Pkg.instantiate()'
julia --project -e 'import Pkg; Pkg.update()'
julia --project -e 'import Pkg; Pkg.precompile()'
cd ..
julia

Then, from Julia Package Manager (press ']' in Julia REPL):

dev ./AlphaZero.jl

Especially since I customize AlphaZero.jl and I want my local version to supersede the registered version.

@Bobingstern Did you manage to get it to work? Your issue looks Windows-specific.

Yes, @smart-fr 's solution seems to work. Thanks for the help!