Open gpgjoe opened 5 years ago
The problem is the line here: https://github.com/FluxML/Gym.jl/blob/master/src/Spaces/dict-space.jl#L1
uses DataStructures
package, but Project.toml
file is not updated to include this.
This can be solved by going to repl and do ] add DataStructures
and then using Gym
.
@tejank10 Maybe this issue should be renamed to reflect the missing dependencies.
Also, there is this warning which also needs to be taken care of
julia> using Gym
[ Info: Recompiling stale cache file /home/vish/.julia/compiled/v1.1/Gym/Z6zPi.ji for Gym [56b9baea-2481-11e9-37ae-75904354ad8c]
┌ Warning: Package Gym does not have Random in its dependencies:
│ - If you have Gym checked out for development and have
│ added Random as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Gym
└ Loading Random into Gym from project dependency, future warnings for Gym are suppressed.
@v-i-s-h is it just a matter of dependencies? Updating Project.toml should solve this problem yes?
I think yes. Adding DataStructures
and Random
to Project.toml
should solve this problem.
@gpgjoe Pinging to verify if the problem has been solved.
Hey!
Thanks for this.
I'm actually new with Julia. I see that you merged your edits here https://github.com/FluxML/Gym.jl/commit/5ad79762a44d8bbf9e177c1761a7b6af62a584ee
. But is there an easy way for me to install this? I've tried ] add https://github.com/FluxML/Gym.jl#5ad79762a44d8bbf9e177c1761a7b6af62a584ee
and it seems that Julia understands the command. Pkg says that the installed version is
[56b9baea] Gym v0.1.0 #5ad7976 (https://github.com/FluxML/Gym.jl)
However, when I run using Gym
I still get the same error as before. I've tried restarting the REPL.
My issue aside, there's a typo in there.
https://github.com/FluxML/Gym.jl/commit/5ad79762a44d8bbf9e177c1761a7b6af62a584ee
In any case, how is it that's working for you?
@gpgjoe Ah, it's unfortunate that my band aid fix needs a band aid fix of its own; but #15 should get things working smoothly. I believe it is possible for Julia users to install various versions of the same package. Maybe give that a try?
Installing from your fork worked.
I'm used to Python, and I'm already in love with Julia's package manager.
@gpgjoe The required changes have been incorporated into the main repository. It'd be better for you to switch to it. Sorry for the unnecessary trouble🙇♂️.
Now I get an error trying to run the example:
using Gym
env = CartPoleEnv()
gives me:
UndefVarError: isnothing not defined
Box(::Array{Float32,1}, ::Array{Float32,1}, ::DataType) at box.jl:39
CartPoleEnv() at CartPole.jl:48
top-level scope at none:0
https://github.com/FluxML/Gym.jl/blob/f68b6cb9bc1c4db113bd534fb790cd54337503cf/src/Spaces/box.jl#L39
Again, I don't understand how it's possible that I get this error but you can run it fine.
I think most of the code doesn't really depend on the above. What is the proper way to edit a Julia package? With packages on the main registry I know I can do dev <package name>
but as this package has been installed from a repo that doesn't really work (there's a different package named Gym).
I've tried copying Gym to a separate folder and then restart Julia, run prepend!(LOAD_PATH, ["my_new_folder"])
and that didn't work.
Right. Wrong version. I was using Julia 1.0.3. Moved to 1.1.0 and it's working now. isnothing
didn't exist in 1.0.3.
Is anyone getting a cant precompile
for Cairo.jl?
Commit 55e36cc308 (2019-05-16 04:10 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
[ Info: Precompiling Gym [56b9baea-2481-11e9-37ae-75904354ad8c]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")
Output of Pkg.build("Cairo") :
Building LibCURL `C:\Users\Anand\.julia\packages\LibCURL\lWJxD\deps\build.log`
Building WinRPM `C:\Users\Anand\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
Building Homebrew → `C:\Users\Anand\.julia\packages\Homebrew\s09IX\deps\build.log`
Building Cairo → `C:\Users\Anand\.julia\packages\Cairo\CXPG1\deps\build.log`
New to Julia, not sure what's going on, Thanks!
===== update =====
After add Cairo
and another Pkg.build("Cairo"), I can now call using Gym
.
Any ideas why the initial install of Gym (from github), didn't get this?
@anandijain can't really say that without knowing what cause Cairo's build process to fail the first time. If you have the complete stacktrace, that could be helpful. Although, Cairo.jl has been acting strangely as of late, even on macOS. It is being looked into.
This just happened. I ran
] add https://github.com/FluxML/Gym.jl
as described on Readme, and then I ranusing Gym
, and I got this:EDIT:
Let me know if more information would help you.