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

"conda env create" error: ResolvePackageNotFound #6

Open
songyuc opened this issue Jan 11, 2021 · 5 comments
Open

"conda env create" error: ResolvePackageNotFound #6

songyuc opened this issue Jan 11, 2021 · 5 comments

Comments

@songyuc
Copy link

songyuc commented Jan 11, 2021

Hi guys,
I tried to create the conda environment using conda env create -f environment.yml, but it showed:
image
So how can I solve it?

Your answer or idea will be appreciated!

@ancorasir
Copy link

Met the same problem!

@neverstoplearn
Copy link

I meet the same question as you,have you solve it?

@songyuc
Copy link
Author

songyuc commented Apr 12, 2021

Hi, @neverstoplearn , I didn‘t solve it.

@pierrefranklin
Copy link

Removing the specific builds (ie the 3rd part of each line, for instance "- libffi==3.3=h0a44026_1" becomes "- libffi==3.3") worked for me. I also needed to install some additional packages afterwards.

The specific builds were not available to my conda, I am running Ubuntu 18.04 with conda version 4.10.1

@13rac1
Copy link

13rac1 commented Apr 20, 2023

I encountered this issue, upgraded libraries per #13, removed hashes, then upgraded the minimum number of dependencies until the environment could be created. Confirmed the original listed hashes are for Mac only. I'm running Mint 21 aka Ubuntu 22.04 with conda 23.3.1. The environment creation works with the following environment.yml:

name: mario
channels:
  - defaults
dependencies:
  - ca-certificates=2020.1.1=0
  - certifi=2020.4.5.1=py38_0
  - libcxx=14
  - libedit=3.1
  - libffi=3.3
  - ncurses=6.2
  - openssl=1.1
  - pip=20.0.2=py38_3
  - python=3.8.3
  - readline=8.0
  - setuptools=46.4.0=py38_0
  - sqlite=3.31.1
  - tk=8.6.8
  - wheel=0.34.2=py38_0
  - xz=5.2.5
  - zlib=1.2
  - pip:
      - cloudpickle==2.0.0
      - future==0.18.2
      - gym==0.21.0
      - gym-super-mario-bros==7.3.2
      - nes-py==8.1.8
      - numpy==1.21.2
      - matplotlib==3.4.3
      - opencv-python==4.5.3.56
      - pillow==8.3.2
      - pyglet==1.5.21
      - scikit-image==0.18.3
      - scipy==1.7.1
      - torch==1.9.1
      - torchvision==0.10.1
      - tqdm==4.62.3
prefix: /opt/anaconda3/envs/mario

Then it failed with:

$ python replay.py
Loading model at checkpoints/2020-10-21T18-25-27/mario.chkpt with exploration rate 0.1
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

The solution to that, on my machine, is: https://askubuntu.com/a/1357344

export MESA_LOADER_DRIVER_OVERRIDE=i965

Working using the pre-trained Mario checkpoint:

$ python replay.py
Loading model at checkpoints/2020-10-21T18-25-27/mario.chkpt with exploration rate 0.1
Episode 0 - Step 40 - Epsilon 0.1 - Mean Reward 231.0 - Mean Length 40.0 - Mean Loss 0.0 - Mean Q Value 0.0 - Time Delta 2.266 - Time 2023-04-19T17:59:58

ksnip_20230419-175230

Step by step

  1. git clone git@github.com:yfeng997/MadMario.git
  2. Edit the environment.yml to the above
  3. Download the pre-trained Mario checkpoint: https://drive.google.com/file/d/1RRwhSMUrpBBRyAsfHLPGt1rlYFoiuus2/view?usp=sharing
  4. mkdir -p checkpoints/2020-10-21T18-25-27
  5. Move the file from your downloads to the correct directory with the name expected by replay.py: mv ~/Downloads/trained_mario.chkpt checkpoints/2020-10-21T18-25-27/mario.chkpt
  6. Create the Anaconda env: conda env create -f environment.yml
  7. Activate it: conda activate mario
  8. Change the MESA loader (if needed): export MESA_LOADER_DRIVER_OVERRIDE=i965
  9. Run it: python replay.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants