Unity-Technologies / obstacle-tower-env

Obstacle Tower Environment
Apache License 2.0
540 stars 124 forks source link

ModuleNotFoundError mlagents_envs' #85

Open BhaskarTrivedi opened 5 years ago

BhaskarTrivedi commented 5 years ago

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 [options] mlagents-learn --help Options: --env= Name of the Unity executable [default: None]. --curriculum= Curriculum json directory for environment [default: None]. --keep-checkpoints= How many model checkpoints to keep [default: 5]. --lesson= Start learning from this lesson [default: 0]. --load Whether to load the model or randomly initialize [default: False]. --run-id= The directory name for model and summary statistics [default: ppo]. --num-runs= Number of concurrent training sessions [default: 1]. --save-freq= Frequency at which to save model [default: 50000]. --seed= 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= Base port for environment communication [default: 5005]. --num-envs= Number of parallel environments to use for training [default: 1] --docker-target-name=
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 commented 5 years ago

Hello @BhaskarTrivedi

Can you explain what you are trying to run?

BhaskarTrivedi commented 5 years ago

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