Giter Club home page Giter Club logo

Comments (4)

ppaquette avatar ppaquette commented on August 14, 2024

I fixed a couple of bugs in gym-pull yesterday. Make sure you are using v0.1.5 and copy the output of the following commands:

>>> import gym
>>> import gym_pull
>>> [env for env in gym_pull.list() if 'ppaquette' in env]
>>> gym_pull.pull('github.com/ppaquette/gym-super-mario')
>>> [env for env in gym_pull.list() if 'ppaquette' in env]
>>> import ppaquette_gym_super_mario
>>> print(ppaquette_gym_super_mario.__file__)
>>> [env for env in gym_pull.list() if 'ppaquette' in env]

and
cat /Users/ggrand/Desktop/gym/gym/envs/.envs.json

from gym-super-mario.

gabegrand avatar gabegrand commented on August 14, 2024

Hi Philip, here's the output from running those commands in terminal. By the way, I used to have the gym directory cloned on my Desktop, but then I deleted it and installed gym using pip in an attempt to fix the issue with gym-pull. I noticed that pip is complaining about that, so I figured it'd be worth mentioning.

Thanks in advance for your help.

Gabes-MacBook-Pro-2:~ ggrand$ pip show gym-pull
---
Metadata-Version: 2.0
Name: gym-pull
Version: 0.1.5
Summary: Add-on for OpenAI Gym that supports automatic downloading of user environments.
Home-page: https://github.com/ppaquette/gym-pull
Author: Philip Paquette
Author-email: [email protected]
Installer: pip
License: MIT License
Location: /anaconda/lib/python2.7/site-packages
Requires: gym, six
Classifiers:
Gabes-MacBook-Pro-2:~ ggrand$ python
Python 2.7.11 |Anaconda 2.3.0 (x86_64)| (default, Dec  6 2015, 18:57:58) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import gym
>>> import gym_pull
>>> [env for env in gym_pull.list() if 'ppaquette' in env]
[]
>>> gym_pull.pull('github.com/ppaquette/gym-super-mario')
[2016-10-24 16:35:23,739] Installing pip package from "https://github.com/ppaquette/gym-super-mario.git"
Collecting git+https://github.com/ppaquette/gym-super-mario.git
  Cloning https://github.com/ppaquette/gym-super-mario.git to /var/folders/p5/m1z33npj37z93fws69vxykv80000gn/T/pip-wvSgBY-build
Collecting gym>=0.2.3 (from ppaquette-gym-super-mario==0.0.1)
  Downloading gym-0.4.9.tar.gz (141kB)
    100% |████████████████████████████████| 143kB 1.6MB/s 
Requirement already up-to-date: numpy>=1.10.4 in /anaconda/lib/python2.7/site-packages (from gym>=0.2.3->ppaquette-gym-super-mario==0.0.1)
Requirement already up-to-date: requests>=2.0 in /anaconda/lib/python2.7/site-packages (from gym>=0.2.3->ppaquette-gym-super-mario==0.0.1)
Requirement already up-to-date: six in /anaconda/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from gym>=0.2.3->ppaquette-gym-super-mario==0.0.1)
Requirement already up-to-date: pyglet>=1.2.0 in /anaconda/lib/python2.7/site-packages (from gym>=0.2.3->ppaquette-gym-super-mario==0.0.1)
Building wheels for collected packages: gym
  Running setup.py bdist_wheel for gym ... done
  Stored in directory: /Users/ggrand/Library/Caches/pip/wheels/97/48/bf/ccfb5f1f105edb07930934297e4c0f97ad7ed1cb9fe6db338e
Successfully built gym
Installing collected packages: gym, ppaquette-gym-super-mario
  Found existing installation: gym 0.4.8
Exception:
Traceback (most recent call last):
  File "//anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "//anaconda/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "//anaconda/lib/python2.7/site-packages/pip/req/req_set.py", line 736, in install
    requirement.uninstall(auto_confirm=True)
  File "//anaconda/lib/python2.7/site-packages/pip/req/req_install.py", line 687, in uninstall
    '(at %s)' % (link_pointer, self.name, dist.location)
AssertionError: Egg-link /Users/ggrand/Desktop/gym does not match installed location of gym (at /anaconda/lib/python2.7/site-packages)
>>> [env for env in gym_pull.list() if 'ppaquette' in env]
[]
>>> import ppaquette_gym_super_mario
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "//anaconda/lib/python2.7/site-packages/ppaquette_gym_super_mario/__init__.py", line 4, in <module>
    from .nes_env import NesEnv, MetaNesEnv
  File "//anaconda/lib/python2.7/site-packages/ppaquette_gym_super_mario/nes_env.py", line 20, in <module>
    raise gym.error.DependencyNotInstalled("fceux is required. Try installing with apt-get install fceux.")
gym.error.DependencyNotInstalled: fceux is required. Try installing with apt-get install fceux.
>>> print(ppaquette_gym_super_mario.__file__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'ppaquette_gym_super_mario' is not defined
>>> [env for env in gym_pull.list() if 'ppaquette' in env]
[]

Gabes-MacBook-Pro-2:~ ggrand$ cat /Users/ggrand/Desktop/gym/gym/envs/.envs.json
cat: /Users/ggrand/Desktop/gym/gym/envs/.envs.json: No such file or directory

from gym-super-mario.

ppaquette avatar ppaquette commented on August 14, 2024

There are 2 problems:

  1. Conflict between gym packages.
AssertionError: Egg-link /Users/ggrand/Desktop/gym does not match installed location of gym (at /anaconda/lib/python2.7/site-packages)
  1. fceux (NES emulator) is not installed.
gym.error.DependencyNotInstalled: fceux is required. Try installing with apt-get install fceux.

The gym-pull package is just a wrapper that installs the package ppaquette_gym_super_mario by running pip install git+https://github.com/ppaquette/gym-super-mario/ and then imports it automatically on import by running import ppaquette_gym_super_mario.

The ppaquette_gym_super_mario registers its envs on import with gym.

from gym-super-mario.

gabegrand avatar gabegrand commented on August 14, 2024

Hi Philip, I uninstalled and reinstalled both the gym and gym_pull packages using pip. I also installed fceux using brew. I was able to get the emulator working, but only after running the command import ppaquette_gym_super_mario. Before that, running the command [env for env in gym_pull.list() if 'ppaquette' in env] would return an empty array.

I also have some questions about how to pipe actions into the emulator, but since that's a separate issue, I'll close this issue and open a new one.

from gym-super-mario.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.