Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError mlagents_envs' #85

Open
BhaskarTrivedi opened this issue Apr 20, 2019 · 2 comments
Open

ModuleNotFoundError mlagents_envs' #85

BhaskarTrivedi opened this issue Apr 20, 2019 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@BhaskarTrivedi
Copy link

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 from obstacle_tower_env import ObstacleTowerEnv
2 get_ipython().run_line_magic('matplotlib', 'inline')
3 from matplotlib import pyplot as plt

~/obstacle-tower-env/obstacle_tower_env.py in
4 import gym
5 import numpy as np
----> 6 from mlagents_envs import UnityEnvironment
7 from gym import error, spaces
8 import os

ModuleNotFoundError: No module named 'mlagents_envs'

Pip freeze
MarkupSafe 1.1.1
matplotlib 3.0.3
mistune 0.8.4
mlagents 0.6.2 /home/user/ml-agents/ml-agents
mlagents-envs 0.6.2 /home/user/ml-agents/ml-agents-envs
more-itertools 7.0.0
nbconvert 5.4.1
nbformat 4.4.0
notebook 5.7.8
numpy 1.14.5
obstacle-tower-env 1.3 /home/bhaskartrivedi/obstacle-tower-env
pandocfilters 1.4.2
parso 0.4.0

output of mlagents-learn --help
mlagents-learn --help

                    ▄▄▄▓▓▓▓
               ╓▓▓▓▓▓▓█▓▓▓▓▓
          ,▄▄▄m▀▀▀'  ,▓▓▓▀▓▓▄                           ▓▓▓  ▓▓▌
        ▄▓▓▓▀'      ▄▓▓▀  ▓▓▓      ▄▄     ▄▄ ,▄▄ ▄▄▄▄   ,▄▄ ▄▓▓▌▄ ▄▄▄    ,▄▄
      ▄▓▓▓▀        ▄▓▓▀   ▐▓▓▌     ▓▓▌   ▐▓▓ ▐▓▓▓▀▀▀▓▓▌ ▓▓▓ ▀▓▓▌▀ ^▓▓▌  ╒▓▓▌
    ▄▓▓▓▓▓▄▄▄▄▄▄▄▄▓▓▓      ▓▀      ▓▓▌   ▐▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▌   ▐▓▓▄ ▓▓▌
    ▀▓▓▓▓▀▀▀▀▀▀▀▀▀▀▓▓▄     ▓▓      ▓▓▌   ▐▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▌    ▐▓▓▐▓▓
      ^█▓▓▓        ▀▓▓▄   ▐▓▓▌     ▓▓▓▓▄▓▓▓▓ ▐▓▓    ▓▓▓ ▓▓▓  ▓▓▓▄    ▓▓▓▓`
        '▀▓▓▓▄      ^▓▓▓  ▓▓▓       └▀▀▀▀ ▀▀ ^▀▀    `▀▀ `▀▀   '▀▀    ▐▓▓▌
           ▀▀▀▀▓▄▄▄   ▓▓▓▓▓▓,                                      ▓▓▓▓▀
               `▀█▓▓▓▓▓▓▓▓▓▌
                    ¬`▀▀▀█▓

    
Usage:
  mlagents-learn <trainer-config-path> [options]
  mlagents-learn --help

Options:
  --env=<file>               Name of the Unity executable [default: None].
  --curriculum=<directory>   Curriculum json directory for environment [default: None].
  --keep-checkpoints=<n>     How many model checkpoints to keep [default: 5].
  --lesson=<n>               Start learning from this lesson [default: 0].
  --load                     Whether to load the model or randomly initialize [default: False].
  --run-id=<path>            The directory name for model and summary statistics [default: ppo].
  --num-runs=<n>             Number of concurrent training sessions [default: 1].
  --save-freq=<n>            Frequency at which to save model [default: 50000].
  --seed=<n>                 Random seed used for training [default: -1].
  --slow                     Whether to run the game at training speed [default: False].
  --train                    Whether to train model, or only run inference [default: False].
  --base-port=<n>            Base port for environment communication [default: 5005].
  --num-envs=<n>             Number of parallel environments to use for training [default: 1]
  --docker-target-name=<dt>  Docker volume to store training-specific files [default: None].
  --no-graphics              Whether to run the environment in no-graphics mode [default: False].
  --debug                    Whether to run ML-Agents in debug mode with detailed logging [default: False].
@awjuliani
Copy link
Contributor

Hello @BhaskarTrivedi

Can you explain what you are trying to run?

@awjuliani awjuliani self-assigned this Apr 22, 2019
@awjuliani awjuliani added the help wanted Extra attention is needed label Apr 22, 2019
@BhaskarTrivedi
Copy link
Author

I was runnning obstacle tower competion and created latest unity environment from git. using command mentioned on unity ml-agent git
I followed command
cd ml-agents-envs
pip install -e ./
cd ..
cd ml-agents
pip install -e ./

I dig more and found the issue
mine /home/anaconda3/envs/ml-agents/lib/python3.6/site-packages has no directory mlagents_envs..
it should be there after following pip with -e ./ command which should create and copy required file and directory to your venv.

To solve the issue I manually created mlagents_envs and copy required file and directory but it should be done using pip command mentioned in ml-agent installation guide.

I used following command to create conda venv
conda create -n ml-agents python=3.6
pip install tensorflow==1.7.1

Note : In above pip list command you can see mlagent version as 6.2 because to support obstacle tower i modified verison to 6.2 manually. Version update has no impact with issue as i observed same issue with unchanged setup.py file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants