-
Notifications
You must be signed in to change notification settings - Fork 157
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
problem with gym while installing minerl #788
Comments
Hey. Installing from pip does not work with newer Python versions sadly. You need to install MineRL from the github with the settings in the README: https://github.com/minerllabs/minerl |
Which version of Python do we need? I don't see where in the README the instructions for the correct python version are. |
Yes, those were never added as "the current Python version was the right at the time" 😅 . You can try using e.g., Python 3.8, but I think this leads to issues with other dependencies not supporting older Pythons. This is a dependency-mess that makes installation of the older MineRLs difficult, and maintainers have not had time to fix these issues |
Okay, thank you. Yeah, I wasn't able to figure out how to install v0.3.7, but I eventually got v1.0.0 to work with python 3.10 using Ubuntu VM. |
If you find an install combination that works, also please feel free to open up a PR documenting it to help others get set up! |
I managed to get MineRL 0.4.4 working on Ubuntu 18.04.6 with Python 3.11. Here’s the step-by-step installation guide that worked for me. I've also shared this setup in my GitHub repository. Take a look at this guide if you have issues with MixinGradle while installing MineRL 0.4.4. Take a look at this table to check the latest GCC your OS supports. # Step 1: Create a Conda environment with Python 3.11
conda create -n exp_minerl044 python=3.11
conda activate exp_minerl044
# Step 2: Install dependencies (Gym 0.19.0)
conda install conda-forge::openjdk=8
pip install setuptools==65.5.0 pip==21 wheel==0.38.0
pip install gym==0.19.0
pip install --upgrade pip
# Step 3: Update GCC (if required). You need gcc >= 9.1.
# Take a look at this table https://askubuntu.com/a/1163021/901082 to check the latest GCC your OS supports
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y software-properties-common
sudo apt-get install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 120
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 120
# Step 4. Install Dev Dependencies
sudo apt install -y libxml2-dev libxslt1-dev gfortran libopenblas-dev
# Step 4: Download and install MineRL 0.4.4
OPENSSL_ROOT_DIR=$CONDA_PREFIX pip download --no-binary :all: minerl==0.4.4
tar -xvf minerl-0.4.4.tar.gz
cd minerl-0.4.4
# Step 5: Fix compatibility issues in requirements and build.gradle
# - Remove the gym line from requirements.txt
# - Edit minerl-0.4.4/minerl/Malmo/Minecraft/build.gradle:L19 as per this guide:
# https://github.com/MineDojo/MineDojo/issues/113#issuecomment-1908997704
# Add the following Maven repository:
# maven { url 'file:/absolute-path/to/that/repo's/parent' }
pip install -r requirements.txt
pip install .
# Step 6: Install additional tools for your experiments
pip install wandb tensorboard moviepy stable-baselines3
pip install --upgrade git+https://github.com/DLR-RM/stable-baselines3.git # Ensures correct video rendering
# Step 7: Run MineRL (for headless environment, you should prepend vglrun to the command
python experiments/minerl044.py --image_width 64x64 --load simulation To install vglrun, take a look at these guides: If you encounter any issues, feel free to ask here or check out my repository for more details. |
So, I tried installing on my windows system instead of the Ubuntu VM, and these were the exact steps I followed: this is for MineRL-1.0.2, on Windows, using git bash https://docs.google.com/document/d/1C0SI3YShkjO1t-yqURLVF_7Uj5ynvLqrDkMA8uZinqw/edit?usp=sharing It was giving an error at the end that I couldn't figure out, saying: However, I tried running "pip install git+https://github.com/minerllabs/minerl" |
@lukedoma1 Yup! v1.0.0 installation does not work. Was this an instruction somewhere outside github issues (e.g,. on a webpage/readme)? That needs to be fixed :) |
@Miffyli I was following the install command on this page: https://minerl.readthedocs.io/en/latest/notes/versions.html |
Thanks! I have updated the instructions (will take some time for it to reflect on the live site) :) |
so i decided to try minerl and before even starting i found this problem while doing "pip install minerl"
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
C:\Users\Utente\AppData\Roaming\Python\Python311\site-packages\setuptools_distutils\dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
The text was updated successfully, but these errors were encountered: