Repository: google-deepmind/meltingpot
Issue: Cannot import dmlab2d_pybind on MacBook Pro Apple M1
Root cause: Environment Incompatibility

Hello all!

I am trying to install and run lab2d and meltingpot on my laptop:

Model Name:	MacBook Pro
Model Identifier:	MacBookPro17,1
Chip:	Apple M1
Total Number of Cores:	8 (4 performance and 4 efficiency)
Memory:	16 GB

Here is the miniconda version:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python
Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_platform()
'macosx-11.1-arm64'
>>> exit()

I installed lab2d via the following command:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % bazel build -c opt --config=lua5_2 //dmlab2d:dmlab2d_wheel
INFO: Build option --//dmlab2d/lib/lua:lua_version has changed, discarding analysis cache.
INFO: Analyzed target //dmlab2d:dmlab2d_wheel (0 packages loaded, 1772 targets configured).
INFO: Found 1 target...
Target //dmlab2d:dmlab2d_wheel up-to-date:
  bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whl
  bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whlname
INFO: Elapsed time: 20.048s, Critical Path: 16.83s
INFO: 52 processes: 3 internal, 49 darwin-sandbox.
INFO: Build completed successfully, 52 total actions

Then when I try to import "dmlab2d" from inside "lab2d-main" folder, it gives the following error:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python
Python 3.9.12 (main, Apr  5 2022, 01:52:34) 
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dmlab2d
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/asataryd/Documents/ENI-Projects/Aslan/In-silico-Experimental-Economics-through-MARL-Autocurricula/Githubs/lab2d-main/dmlab2d/__init__.py", line 21, in <module>
    import dmlab2d.dmlab2d_pybind as dmlab2d_pybind
ModuleNotFoundError: No module named 'dmlab2d.dmlab2d_pybind'

It seems the problem is related to the type of the "dmlab2d_pybind" file which is a c++ file.

However, I already installed gcc:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % where gcc
/opt/homebrew/bin/gcc
/opt/homebrew/bin/gcc
/usr/bin/gcc
(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % gcc --version
gcc (Homebrew GCC 11.3.0_2) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Also, this is the content of the PATH file:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % echo $PATH
/Users/asataryd/opt/miniconda3/bin:/Users/asataryd/opt/miniconda3/condabin:/Users/asataryd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin

Additionally, this is the list of python modules installed in the environment:

(meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % conda list   
# packages in environment at /Users/asataryd/opt/miniconda3/envs/meltingpot:
#
# Name                    Version                   Build  Channel
absl-py                   1.1.0                    pypi_0    pypi
appnope                   0.1.2           py310hca03da5_1001    anaconda
asttokens                 2.0.5              pyhd3eb1b0_0    anaconda
backcall                  0.2.0              pyhd3eb1b0_0    anaconda
bzip2                     1.0.8                h620ffc9_4    anaconda
ca-certificates           2022.6.15            h4653dfc_0    conda-forge
certifi                   2022.5.18.1     py310hca03da5_0  
debugpy                   1.5.1           py310hc377ac9_0    anaconda
decorator                 5.1.1              pyhd3eb1b0_0    anaconda
dm-env                    1.5                      pypi_0    pypi
dm-tree                   0.1.7                    pypi_0    pypi
entrypoints               0.4             py310hca03da5_0    anaconda
executing                 0.8.3              pyhd3eb1b0_0    anaconda
ipykernel                 6.9.1           py310hca03da5_0    anaconda
ipython                   8.2.0           py310hca03da5_0    anaconda
jedi                      0.18.1          py310hca03da5_1    anaconda
jupyter_client            7.2.2           py310hca03da5_0    anaconda
jupyter_core              4.9.2           py310hca03da5_0    anaconda
libcxx                    12.0.0               hf6beb65_1    anaconda
libffi                    3.4.2                hc377ac9_2    anaconda
libsodium                 1.0.18               h1a28f6b_0    anaconda
libzlib                   1.2.12               ha287fd2_1    conda-forge
matplotlib-inline         0.1.2              pyhd3eb1b0_2    anaconda
ncurses                   6.3                  h1a28f6b_2    anaconda
nest-asyncio              1.5.5           py310hca03da5_0    anaconda
numpy                     1.22.4                   pypi_0    pypi
openssl                   1.1.1o               ha287fd2_0    conda-forge
packaging                 21.3                     pypi_0    pypi
parso                     0.8.3              pyhd3eb1b0_0    anaconda
pexpect                   4.8.0              pyhd3eb1b0_3    anaconda
pickleshare               0.7.5           pyhd3eb1b0_1003    anaconda
pip                       22.1.2                   pypi_0    pypi
prompt-toolkit            3.0.20             pyhd3eb1b0_0    anaconda
ptyprocess                0.7.0              pyhd3eb1b0_2    anaconda
pure_eval                 0.2.2              pyhd3eb1b0_0    anaconda
pygments                  2.11.2             pyhd3eb1b0_0    anaconda
pyparsing                 3.0.9                    pypi_0    pypi
python                    3.10.4               hbdb9e5c_0    anaconda
python-dateutil           2.8.2              pyhd3eb1b0_0    anaconda
pyzmq                     22.3.0          py310hc377ac9_2    anaconda
readline                  8.1.2                h1a28f6b_1    anaconda
setuptools                61.2.0          py310hca03da5_0    anaconda
six                       1.16.0             pyhd3eb1b0_1    anaconda
sqlite                    3.38.2               h1058600_0    anaconda
stack_data                0.2.0              pyhd3eb1b0_0    anaconda
tk                        8.6.11               hb8d0fd4_0    anaconda
tornado                   6.1             py310h1a28f6b_0    anaconda
traitlets                 5.1.1              pyhd3eb1b0_0    anaconda
tzdata                    2022a                hda174b7_0    anaconda
wcwidth                   0.2.5              pyhd3eb1b0_0    anaconda
wheel                     0.37.1             pyhd3eb1b0_0    anaconda
xz                        5.2.5                h1a28f6b_0    anaconda
zeromq                    4.3.4                hc377ac9_0    anaconda
zlib                      1.2.12               ha287fd2_1    conda-forge

Very recently, I started to work with MacBook Pro Apple M1. Also, I am not that much expert in software issues. So I greatly appreciate any help. Also, I would be happy to share more information if you need. 



> Hello all!
> 
> I am trying to install and run lab2d and meltingpot on my laptop:
> 
> Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB
> 
> Here is the miniconda version:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
> 
> > > > import sysconfig
> > > > sysconfig.get_platform()
> > > > 'macosx-11.1-arm64'
> > > > exit()
> 
> I installed lab2d via the following command:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % bazel build -c opt --config=lua5_2 //dmlab2d:dmlab2d_wheel INFO: Build option --//dmlab2d/lib/lua:lua_version has changed, discarding analysis cache. INFO: Analyzed target //dmlab2d:dmlab2d_wheel (0 packages loaded, 1772 targets configured). INFO: Found 1 target... Target //dmlab2d:dmlab2d_wheel up-to-date: bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whl bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whlname INFO: Elapsed time: 20.048s, Critical Path: 16.83s INFO: 52 processes: 3 internal, 49 darwin-sandbox. INFO: Build completed successfully, 52 total actions
> 
> Then when I try to import "dmlab2d" from inside "lab2d-main" folder, it gives the following error:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.
> 
> > > > import dmlab2d
> > > > Traceback (most recent call last):
> > > > File "", line 1, in 
> > > > File "/Users/asataryd/Documents/ENI-Projects/Aslan/In-silico-Experimental-Economics-through-MARL-Autocurricula/Githubs/lab2d-main/dmlab2d/**init**.py", line 21, in 
> > > > import dmlab2d.dmlab2d_pybind as dmlab2d_pybind
> > > > ModuleNotFoundError: No module named 'dmlab2d.dmlab2d_pybind'
> 
> It seems the problem is related to the type of the "dmlab2d_pybind" file which is a c++ file.
> 
> However, I already installed gcc:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % where gcc /opt/homebrew/bin/gcc /opt/homebrew/bin/gcc /usr/bin/gcc (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % gcc --version gcc (Homebrew GCC 11.3.0_2) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Also, this is the content of the PATH file:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % echo $PATH /Users/asataryd/opt/miniconda3/bin:/Users/asataryd/opt/miniconda3/condabin:/Users/asataryd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
> 
> Additionally, this is the list of python modules installed in the environment:
> 
> (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % conda list
> 
> # packages in environment at /Users/asataryd/opt/miniconda3/envs/meltingpot:
> # Name Version Build Channel
> absl-py 1.1.0 pypi_0 pypi appnope 0.1.2 py310hca03da5_1001 anaconda asttokens 2.0.5 pyhd3eb1b0_0 anaconda backcall 0.2.0 pyhd3eb1b0_0 anaconda bzip2 1.0.8 h620ffc9_4 anaconda ca-certificates 2022.6.15 h4653dfc_0 conda-forge certifi 2022.5.18.1 py310hca03da5_0 debugpy 1.5.1 py310hc377ac9_0 anaconda decorator 5.1.1 pyhd3eb1b0_0 anaconda dm-env 1.5 pypi_0 pypi dm-tree 0.1.7 pypi_0 pypi entrypoints 0.4 py310hca03da5_0 anaconda executing 0.8.3 pyhd3eb1b0_0 anaconda ipykernel 6.9.1 py310hca03da5_0 anaconda ipython 8.2.0 py310hca03da5_0 anaconda jedi 0.18.1 py310hca03da5_1 anaconda jupyter_client 7.2.2 py310hca03da5_0 anaconda jupyter_core 4.9.2 py310hca03da5_0 anaconda libcxx 12.0.0 hf6beb65_1 anaconda libffi 3.4.2 hc377ac9_2 anaconda libsodium 1.0.18 h1a28f6b_0 anaconda libzlib 1.2.12 ha287fd2_1 conda-forge matplotlib-inline 0.1.2 pyhd3eb1b0_2 anaconda ncurses 6.3 h1a28f6b_2 anaconda nest-asyncio 1.5.5 py310hca03da5_0 anaconda numpy 1.22.4 pypi_0 pypi openssl 1.1.1o ha287fd2_0 conda-forge packaging 21.3 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 anaconda pexpect 4.8.0 pyhd3eb1b0_3 anaconda pickleshare 0.7.5 pyhd3eb1b0_1003 anaconda pip 22.1.2 pypi_0 pypi prompt-toolkit 3.0.20 pyhd3eb1b0_0 anaconda ptyprocess 0.7.0 pyhd3eb1b0_2 anaconda pure_eval 0.2.2 pyhd3eb1b0_0 anaconda pygments 2.11.2 pyhd3eb1b0_0 anaconda pyparsing 3.0.9 pypi_0 pypi python 3.10.4 hbdb9e5c_0 anaconda python-dateutil 2.8.2 pyhd3eb1b0_0 anaconda pyzmq 22.3.0 py310hc377ac9_2 anaconda readline 8.1.2 h1a28f6b_1 anaconda setuptools 61.2.0 py310hca03da5_0 anaconda six 1.16.0 pyhd3eb1b0_1 anaconda sqlite 3.38.2 h1058600_0 anaconda stack_data 0.2.0 pyhd3eb1b0_0 anaconda tk 8.6.11 hb8d0fd4_0 anaconda tornado 6.1 py310h1a28f6b_0 anaconda traitlets 5.1.1 pyhd3eb1b0_0 anaconda tzdata 2022a hda174b7_0 anaconda wcwidth 0.2.5 pyhd3eb1b0_0 anaconda wheel 0.37.1 pyhd3eb1b0_0 anaconda xz 5.2.5 h1a28f6b_0 anaconda zeromq 4.3.4 hc377ac9_0 anaconda zlib 1.2.12 ha287fd2_1 conda-forge
> 
> Very recently, I started to work with MacBook Pro Apple M1. Also, I am not that much expert in software issues. So I greatly appreciate any help. Also, I would be happy to share more information if you need.

Hey, can you go to the directory where the wheel is in? You can install dmlab2d via pip. On my M1 Macbook, after compiling, I can install dmlab2d via pip:

```bash
$ cd bazel-bin/dmlab2d
$ ll
_objs                                             
dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whlname
dmlab2d_pybind.so-2.params
dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
dmlab2d_pybind.so                                  
lib
$ pip install dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
```
Test it
```python
import dmlab2d
import dmlab2d.runfiles_helper

lab = dmlab2d.Lab2d(dmlab2d.runfiles_helper.find(), {"levelName": "chase_eat"})
env = dmlab2d.Environment(lab, ["WORLD.RGB"])
env.step({})
```



> > Hello all!
> > I am trying to install and run lab2d and meltingpot on my laptop:
> > Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB
> > Here is the miniconda version:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > import sysconfig
> > > > > sysconfig.get_platform()
> > > > > 'macosx-11.1-arm64'
> > > > > exit()
> > 
> > 
> > I installed lab2d via the following command:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % bazel build -c opt --config=lua5_2 //dmlab2d:dmlab2d_wheel INFO: Build option --//dmlab2d/lib/lua:lua_version has changed, discarding analysis cache. INFO: Analyzed target //dmlab2d:dmlab2d_wheel (0 packages loaded, 1772 targets configured). INFO: Found 1 target... Target //dmlab2d:dmlab2d_wheel up-to-date: bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whl bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whlname INFO: Elapsed time: 20.048s, Critical Path: 16.83s INFO: 52 processes: 3 internal, 49 darwin-sandbox. INFO: Build completed successfully, 52 total actions
> > Then when I try to import "dmlab2d" from inside "lab2d-main" folder, it gives the following error:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > import dmlab2d
> > > > > Traceback (most recent call last):
> > > > > File "", line 1, in
> > > > > File "/Users/asataryd/Documents/ENI-Projects/Aslan/In-silico-Experimental-Economics-through-MARL-Autocurricula/Githubs/lab2d-main/dmlab2d/**init**.py", line 21, in
> > > > > import dmlab2d.dmlab2d_pybind as dmlab2d_pybind
> > > > > ModuleNotFoundError: No module named 'dmlab2d.dmlab2d_pybind'
> > 
> > 
> > It seems the problem is related to the type of the "dmlab2d_pybind" file which is a c++ file.
> > However, I already installed gcc:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % where gcc /opt/homebrew/bin/gcc /opt/homebrew/bin/gcc /usr/bin/gcc (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % gcc --version gcc (Homebrew GCC 11.3.0_2) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > Also, this is the content of the PATH file:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % echo $PATH /Users/asataryd/opt/miniconda3/bin:/Users/asataryd/opt/miniconda3/condabin:/Users/asataryd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
> > Additionally, this is the list of python modules installed in the environment:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % conda list
> > # packages in environment at /Users/asataryd/opt/miniconda3/envs/meltingpot:
> > # Name Version Build Channel
> > absl-py 1.1.0 pypi_0 pypi appnope 0.1.2 py310hca03da5_1001 anaconda asttokens 2.0.5 pyhd3eb1b0_0 anaconda backcall 0.2.0 pyhd3eb1b0_0 anaconda bzip2 1.0.8 h620ffc9_4 anaconda ca-certificates 2022.6.15 h4653dfc_0 conda-forge certifi 2022.5.18.1 py310hca03da5_0 debugpy 1.5.1 py310hc377ac9_0 anaconda decorator 5.1.1 pyhd3eb1b0_0 anaconda dm-env 1.5 pypi_0 pypi dm-tree 0.1.7 pypi_0 pypi entrypoints 0.4 py310hca03da5_0 anaconda executing 0.8.3 pyhd3eb1b0_0 anaconda ipykernel 6.9.1 py310hca03da5_0 anaconda ipython 8.2.0 py310hca03da5_0 anaconda jedi 0.18.1 py310hca03da5_1 anaconda jupyter_client 7.2.2 py310hca03da5_0 anaconda jupyter_core 4.9.2 py310hca03da5_0 anaconda libcxx 12.0.0 hf6beb65_1 anaconda libffi 3.4.2 hc377ac9_2 anaconda libsodium 1.0.18 h1a28f6b_0 anaconda libzlib 1.2.12 ha287fd2_1 conda-forge matplotlib-inline 0.1.2 pyhd3eb1b0_2 anaconda ncurses 6.3 h1a28f6b_2 anaconda nest-asyncio 1.5.5 py310hca03da5_0 anaconda numpy 1.22.4 pypi_0 pypi openssl 1.1.1o ha287fd2_0 conda-forge packaging 21.3 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 anaconda pexpect 4.8.0 pyhd3eb1b0_3 anaconda pickleshare 0.7.5 pyhd3eb1b0_1003 anaconda pip 22.1.2 pypi_0 pypi prompt-toolkit 3.0.20 pyhd3eb1b0_0 anaconda ptyprocess 0.7.0 pyhd3eb1b0_2 anaconda pure_eval 0.2.2 pyhd3eb1b0_0 anaconda pygments 2.11.2 pyhd3eb1b0_0 anaconda pyparsing 3.0.9 pypi_0 pypi python 3.10.4 hbdb9e5c_0 anaconda python-dateutil 2.8.2 pyhd3eb1b0_0 anaconda pyzmq 22.3.0 py310hc377ac9_2 anaconda readline 8.1.2 h1a28f6b_1 anaconda setuptools 61.2.0 py310hca03da5_0 anaconda six 1.16.0 pyhd3eb1b0_1 anaconda sqlite 3.38.2 h1058600_0 anaconda stack_data 0.2.0 pyhd3eb1b0_0 anaconda tk 8.6.11 hb8d0fd4_0 anaconda tornado 6.1 py310h1a28f6b_0 anaconda traitlets 5.1.1 pyhd3eb1b0_0 anaconda tzdata 2022a hda174b7_0 anaconda wcwidth 0.2.5 pyhd3eb1b0_0 anaconda wheel 0.37.1 pyhd3eb1b0_0 anaconda xz 5.2.5 h1a28f6b_0 anaconda zeromq 4.3.4 hc377ac9_0 anaconda zlib 1.2.12 ha287fd2_1 conda-forge
> > Very recently, I started to work with MacBook Pro Apple M1. Also, I am not that much expert in software issues. So I greatly appreciate any help. Also, I would be happy to share more information if you need.
> 
> Hey, can you go to the directory where the wheel is in? You can install dmlab2d via pip. On my M1 Macbook, after compiling, I can install dmlab2d via pip:
> 
> ```shell
> $ cd bazel-bin/dmlab2d
> $ ll
> _objs                                             
> dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whlname
> dmlab2d_pybind.so-2.params
> dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> dmlab2d_pybind.so                                  
> lib
> $ pip install dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> ```
> 
> Test it
> 
> ```python
> import dmlab2d
> import dmlab2d.runfiles_helper
> 
> lab = dmlab2d.Lab2d(dmlab2d.runfiles_helper.find(), {"levelName": "chase_eat"})
> env = dmlab2d.Environment(lab, ["WORLD.RGB"])
> env.step({})
> ```

Hi, I have successfully installed dmlab2d and can do the test. However, after installing Melting Pot and using pytest to test the installation, my M1 chip says **illegal hardware instruction**, I wonder how you solve this problem.

Thank you!

> > > Hello all!
> > > I am trying to install and run lab2d and meltingpot on my laptop:
> > > Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB
> > > Here is the miniconda version:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > > import sysconfig
> > > > > > sysconfig.get_platform()
> > > > > > 'macosx-11.1-arm64'
> > > > > > exit()
> > > 
> > > 
> > > I installed lab2d via the following command:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % bazel build -c opt --config=lua5_2 //dmlab2d:dmlab2d_wheel INFO: Build option --//dmlab2d/lib/lua:lua_version has changed, discarding analysis cache. INFO: Analyzed target //dmlab2d:dmlab2d_wheel (0 packages loaded, 1772 targets configured). INFO: Found 1 target... Target //dmlab2d:dmlab2d_wheel up-to-date: bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whl bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whlname INFO: Elapsed time: 20.048s, Critical Path: 16.83s INFO: 52 processes: 3 internal, 49 darwin-sandbox. INFO: Build completed successfully, 52 total actions
> > > Then when I try to import "dmlab2d" from inside "lab2d-main" folder, it gives the following error:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > > import dmlab2d
> > > > > > Traceback (most recent call last):
> > > > > > File "", line 1, in
> > > > > > File "/Users/asataryd/Documents/ENI-Projects/Aslan/In-silico-Experimental-Economics-through-MARL-Autocurricula/Githubs/lab2d-main/dmlab2d/**init**.py", line 21, in
> > > > > > import dmlab2d.dmlab2d_pybind as dmlab2d_pybind
> > > > > > ModuleNotFoundError: No module named 'dmlab2d.dmlab2d_pybind'
> > > 
> > > 
> > > It seems the problem is related to the type of the "dmlab2d_pybind" file which is a c++ file.
> > > However, I already installed gcc:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % where gcc /opt/homebrew/bin/gcc /opt/homebrew/bin/gcc /usr/bin/gcc (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % gcc --version gcc (Homebrew GCC 11.3.0_2) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > > Also, this is the content of the PATH file:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % echo $PATH /Users/asataryd/opt/miniconda3/bin:/Users/asataryd/opt/miniconda3/condabin:/Users/asataryd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
> > > Additionally, this is the list of python modules installed in the environment:
> > > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % conda list
> > > # packages in environment at /Users/asataryd/opt/miniconda3/envs/meltingpot:
> > > # Name Version Build Channel
> > > absl-py 1.1.0 pypi_0 pypi appnope 0.1.2 py310hca03da5_1001 anaconda asttokens 2.0.5 pyhd3eb1b0_0 anaconda backcall 0.2.0 pyhd3eb1b0_0 anaconda bzip2 1.0.8 h620ffc9_4 anaconda ca-certificates 2022.6.15 h4653dfc_0 conda-forge certifi 2022.5.18.1 py310hca03da5_0 debugpy 1.5.1 py310hc377ac9_0 anaconda decorator 5.1.1 pyhd3eb1b0_0 anaconda dm-env 1.5 pypi_0 pypi dm-tree 0.1.7 pypi_0 pypi entrypoints 0.4 py310hca03da5_0 anaconda executing 0.8.3 pyhd3eb1b0_0 anaconda ipykernel 6.9.1 py310hca03da5_0 anaconda ipython 8.2.0 py310hca03da5_0 anaconda jedi 0.18.1 py310hca03da5_1 anaconda jupyter_client 7.2.2 py310hca03da5_0 anaconda jupyter_core 4.9.2 py310hca03da5_0 anaconda libcxx 12.0.0 hf6beb65_1 anaconda libffi 3.4.2 hc377ac9_2 anaconda libsodium 1.0.18 h1a28f6b_0 anaconda libzlib 1.2.12 ha287fd2_1 conda-forge matplotlib-inline 0.1.2 pyhd3eb1b0_2 anaconda ncurses 6.3 h1a28f6b_2 anaconda nest-asyncio 1.5.5 py310hca03da5_0 anaconda numpy 1.22.4 pypi_0 pypi openssl 1.1.1o ha287fd2_0 conda-forge packaging 21.3 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 anaconda pexpect 4.8.0 pyhd3eb1b0_3 anaconda pickleshare 0.7.5 pyhd3eb1b0_1003 anaconda pip 22.1.2 pypi_0 pypi prompt-toolkit 3.0.20 pyhd3eb1b0_0 anaconda ptyprocess 0.7.0 pyhd3eb1b0_2 anaconda pure_eval 0.2.2 pyhd3eb1b0_0 anaconda pygments 2.11.2 pyhd3eb1b0_0 anaconda pyparsing 3.0.9 pypi_0 pypi python 3.10.4 hbdb9e5c_0 anaconda python-dateutil 2.8.2 pyhd3eb1b0_0 anaconda pyzmq 22.3.0 py310hc377ac9_2 anaconda readline 8.1.2 h1a28f6b_1 anaconda setuptools 61.2.0 py310hca03da5_0 anaconda six 1.16.0 pyhd3eb1b0_1 anaconda sqlite 3.38.2 h1058600_0 anaconda stack_data 0.2.0 pyhd3eb1b0_0 anaconda tk 8.6.11 hb8d0fd4_0 anaconda tornado 6.1 py310h1a28f6b_0 anaconda traitlets 5.1.1 pyhd3eb1b0_0 anaconda tzdata 2022a hda174b7_0 anaconda wcwidth 0.2.5 pyhd3eb1b0_0 anaconda wheel 0.37.1 pyhd3eb1b0_0 anaconda xz 5.2.5 h1a28f6b_0 anaconda zeromq 4.3.4 hc377ac9_0 anaconda zlib 1.2.12 ha287fd2_1 conda-forge
> > > Very recently, I started to work with MacBook Pro Apple M1. Also, I am not that much expert in software issues. So I greatly appreciate any help. Also, I would be happy to share more information if you need.
> > 
> > 
> > Hey, can you go to the directory where the wheel is in? You can install dmlab2d via pip. On my M1 Macbook, after compiling, I can install dmlab2d via pip:
> > ```shell
> > $ cd bazel-bin/dmlab2d
> > $ ll
> > _objs                                             
> > dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whlname
> > dmlab2d_pybind.so-2.params
> > dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> > dmlab2d_pybind.so                                  
> > lib
> > $ pip install dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> > ```
> > 
> > 
> >     
> >       
> >     
> > 
> >       
> >     
> > 
> >     
> >   
> > Test it
> > ```python
> > import dmlab2d
> > import dmlab2d.runfiles_helper
> > 
> > lab = dmlab2d.Lab2d(dmlab2d.runfiles_helper.find(), {"levelName": "chase_eat"})
> > env = dmlab2d.Environment(lab, ["WORLD.RGB"])
> > env.step({})
> > ```
> 
> Hi, I have successfully installed dmlab2d and can do the test. However, after installing Melting Pot and using pytest to test the installation, my M1 chip says **illegal hardware instruction**, I wonder how you solve this problem.
> 
> Thank you!

Hey @YuhengHe, can you show more context?

> > Hello all!
> > I am trying to install and run lab2d and meltingpot on my laptop:
> > Model Name: MacBook Pro Model Identifier: MacBookPro17,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB
> > Here is the miniconda version:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > import sysconfig
> > > > > sysconfig.get_platform()
> > > > > 'macosx-11.1-arm64'
> > > > > exit()
> > 
> > 
> > I installed lab2d via the following command:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % bazel build -c opt --config=lua5_2 //dmlab2d:dmlab2d_wheel INFO: Build option --//dmlab2d/lib/lua:lua_version has changed, discarding analysis cache. INFO: Analyzed target //dmlab2d:dmlab2d_wheel (0 packages loaded, 1772 targets configured). INFO: Found 1 target... Target //dmlab2d:dmlab2d_wheel up-to-date: bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whl bazel-bin/dmlab2d/dmlab2d-1.0-cp39-cp39-macosx_12_0_arm64.whlname INFO: Elapsed time: 20.048s, Critical Path: 16.83s INFO: 52 processes: 3 internal, 49 darwin-sandbox. INFO: Build completed successfully, 52 total actions
> > Then when I try to import "dmlab2d" from inside "lab2d-main" folder, it gives the following error:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % python Python 3.9.12 (main, Apr 5 2022, 01:52:34) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information.
> > > > > import dmlab2d
> > > > > Traceback (most recent call last):
> > > > > File "", line 1, in
> > > > > File "/Users/asataryd/Documents/ENI-Projects/Aslan/In-silico-Experimental-Economics-through-MARL-Autocurricula/Githubs/lab2d-main/dmlab2d/**init**.py", line 21, in
> > > > > import dmlab2d.dmlab2d_pybind as dmlab2d_pybind
> > > > > ModuleNotFoundError: No module named 'dmlab2d.dmlab2d_pybind'
> > 
> > 
> > It seems the problem is related to the type of the "dmlab2d_pybind" file which is a c++ file.
> > However, I already installed gcc:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % where gcc /opt/homebrew/bin/gcc /opt/homebrew/bin/gcc /usr/bin/gcc (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % gcc --version gcc (Homebrew GCC 11.3.0_2) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > Also, this is the content of the PATH file:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % echo $PATH /Users/asataryd/opt/miniconda3/bin:/Users/asataryd/opt/miniconda3/condabin:/Users/asataryd/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
> > Additionally, this is the list of python modules installed in the environment:
> > (meltingpot) asataryd@Aslans-MacBook-Pro lab2d-main % conda list
> > # packages in environment at /Users/asataryd/opt/miniconda3/envs/meltingpot:
> > # Name Version Build Channel
> > absl-py 1.1.0 pypi_0 pypi appnope 0.1.2 py310hca03da5_1001 anaconda asttokens 2.0.5 pyhd3eb1b0_0 anaconda backcall 0.2.0 pyhd3eb1b0_0 anaconda bzip2 1.0.8 h620ffc9_4 anaconda ca-certificates 2022.6.15 h4653dfc_0 conda-forge certifi 2022.5.18.1 py310hca03da5_0 debugpy 1.5.1 py310hc377ac9_0 anaconda decorator 5.1.1 pyhd3eb1b0_0 anaconda dm-env 1.5 pypi_0 pypi dm-tree 0.1.7 pypi_0 pypi entrypoints 0.4 py310hca03da5_0 anaconda executing 0.8.3 pyhd3eb1b0_0 anaconda ipykernel 6.9.1 py310hca03da5_0 anaconda ipython 8.2.0 py310hca03da5_0 anaconda jedi 0.18.1 py310hca03da5_1 anaconda jupyter_client 7.2.2 py310hca03da5_0 anaconda jupyter_core 4.9.2 py310hca03da5_0 anaconda libcxx 12.0.0 hf6beb65_1 anaconda libffi 3.4.2 hc377ac9_2 anaconda libsodium 1.0.18 h1a28f6b_0 anaconda libzlib 1.2.12 ha287fd2_1 conda-forge matplotlib-inline 0.1.2 pyhd3eb1b0_2 anaconda ncurses 6.3 h1a28f6b_2 anaconda nest-asyncio 1.5.5 py310hca03da5_0 anaconda numpy 1.22.4 pypi_0 pypi openssl 1.1.1o ha287fd2_0 conda-forge packaging 21.3 pypi_0 pypi parso 0.8.3 pyhd3eb1b0_0 anaconda pexpect 4.8.0 pyhd3eb1b0_3 anaconda pickleshare 0.7.5 pyhd3eb1b0_1003 anaconda pip 22.1.2 pypi_0 pypi prompt-toolkit 3.0.20 pyhd3eb1b0_0 anaconda ptyprocess 0.7.0 pyhd3eb1b0_2 anaconda pure_eval 0.2.2 pyhd3eb1b0_0 anaconda pygments 2.11.2 pyhd3eb1b0_0 anaconda pyparsing 3.0.9 pypi_0 pypi python 3.10.4 hbdb9e5c_0 anaconda python-dateutil 2.8.2 pyhd3eb1b0_0 anaconda pyzmq 22.3.0 py310hc377ac9_2 anaconda readline 8.1.2 h1a28f6b_1 anaconda setuptools 61.2.0 py310hca03da5_0 anaconda six 1.16.0 pyhd3eb1b0_1 anaconda sqlite 3.38.2 h1058600_0 anaconda stack_data 0.2.0 pyhd3eb1b0_0 anaconda tk 8.6.11 hb8d0fd4_0 anaconda tornado 6.1 py310h1a28f6b_0 anaconda traitlets 5.1.1 pyhd3eb1b0_0 anaconda tzdata 2022a hda174b7_0 anaconda wcwidth 0.2.5 pyhd3eb1b0_0 anaconda wheel 0.37.1 pyhd3eb1b0_0 anaconda xz 5.2.5 h1a28f6b_0 anaconda zeromq 4.3.4 hc377ac9_0 anaconda zlib 1.2.12 ha287fd2_1 conda-forge
> > Very recently, I started to work with MacBook Pro Apple M1. Also, I am not that much expert in software issues. So I greatly appreciate any help. Also, I would be happy to share more information if you need.
> 
> Hey, can you go to the directory where the wheel is in? You can install dmlab2d via pip. On my M1 Macbook, after compiling, I can install dmlab2d via pip:
> 
> ```shell
> $ cd bazel-bin/dmlab2d
> $ ll
> _objs                                             
> dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whlname
> dmlab2d_pybind.so-2.params
> dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> dmlab2d_pybind.so                                  
> lib
> $ pip install dmlab2d-1.0-cp37-cp37m-macosx_10_16_x86_64.whl
> ```
> 
> Test it
> 
> ```python
> import dmlab2d
> import dmlab2d.runfiles_helper
> 
> lab = dmlab2d.Lab2d(dmlab2d.runfiles_helper.find(), {"levelName": "chase_eat"})
> env = dmlab2d.Environment(lab, ["WORLD.RGB"])
> env.step({})
> ```

So in the Installation 3. Test the dmlab2d installation in python3, i ran the codes and here is the result:

import dmlab2d
import dmlab2d.runfiles_helper
lab = dmlab2d.Lab2d(dmlab2d.runfiles_helper.find(), {"levelName": "chase_eat"})
env = dmlab2d.Environment(lab, ["WORLD.RGB"])
env.step({})
TimeStep(step_type=<StepType.FIRST: 0>, reward=None, discount=None, observation={'WORLD.RGB': array([[[ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33],
        ...,
        [ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33]],

       [[ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33],
        ...,
        [ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33]],

       [[ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33],
        ...,
        [ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33]],

       ...,

       [[ 80,  25,  33],
        [ 80,  25,  33],
        [ 80,  25,  33],
        ...,
        [ 80,  25,  33],
        [153, 150, 150],
        [153, 150, 150]],

       [[153, 150, 150],
        [153, 150, 150],
        [153, 150, 150],
        ...,
        [153, 150, 150],
        [153, 150, 150],
        [153, 150, 150]],

       [[153, 150, 150],
        [153, 150, 150],
        [153, 150, 150],
        ...,
        [153, 150, 150],
        [153, 150, 150],
        [153, 150, 150]]], dtype=uint8)})

which, I assume, means that dmlab2d is successfully installed. Then moving on to **4. Install Melting Pot** and I have this:

Successfully installed dm-meltingpot-1.0.3.

However, when I tried to execute **pytest meltingpot**, it gave me the following warning:

============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/yuheng/meltingpot
plugins: anyio-2.2.0
collecting ... Fatal Python error: Illegal instruction


So I was wondering if I have installed something wrong. Could you please share how you install the pakages and execute the program on your end? The information for installation on M1 chip is too limited :(

Thank you!

Did you try using `./install.sh`? (You may need to adapt it for your setup).

Also I see OP was using Lua 5.2 which doesn't work (see https://github.com/deepmind/meltingpot/issues/24).

> Did you try using `./install.sh`? (You may need to adapt it for your setup).

HI, I tried `./install.sh` using and the following also happened

```
+ pytest -n auto -ra --durations=10 meltingpot

============================= test session starts ==============================
platform darwin -- Python 3.9.7, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/yuheng/UCLA/Social-RL/meltingpot-main
plugins: xdist-2.5.0, forked-1.4.0, anyio-2.2.0
gw0 ok / gw1 ok / gw2 ok / gw3 ok / gw4 ok / gw5 ok / gw6 ok / gw7 okFatal Python error: Illegal instruction
```


Hi @YuhengHe - thanks for reaching out!

So I ran a fresh install via `install.sh` (no prior `labd2d` installed) with python3.9.11 and seemed to be okay. 

I was able to run all tests and got:

```
1685 passed, 1020 warnings in 170.31s (0:02:50) 
```

The only hiccup was that I had to install bazel first (via `brew install bazel`) and replaced the "tensorflow" in setup.py with "tensorflow-macos".

I did not modify `install.sh` at all.
I did not have Lua installed but this did not seem to be an issue (and I think it built against `5.1` which caused no issue).


 Hope that helps!

@akbir glad it worked out.

@YuhengHe Just tried this out on my M1 mac in a clean venv, and `./install.sh` run from the repo root worked for me after I replaced the `"tensorflow"` requirement in `setup.py` with `"tensorflow-macos"`.

Here's my tool versions:

```
(meltingpot_venv) $ python --version
Python 3.9.9

(meltingpot_venv) $ gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

(meltingpot_venv) $ bazel --version
bazel 5.1.0
```

> i

Thank you @akbir @jagapiou for helping! I created a new venv but they are still not working, but after troubleshooting I figured it may be because i have x86-64 version of anaconda instead of arm64. Changing it to the correct version may solve the problem. I will try and update if it is the case.

Hello @jagapiou 

I tried to fresh install meltingpot on a M1 Macbook pro.

I ensured that I was using conda for M1  and I have the following tools versions

```
(meltingpot_env) % python --version
Python 3.9.11
(meltingpot_env) % bazel --version
bazel 5.1.1
(meltingpot_env) % gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```


I am just running the `./install.sh` in a completely new virtual env and I got the following error when the script is testing meltingpot. 

`ImportError: dlopen(/Users/manuel/opt/anaconda3/envs/meltingpot_env/lib/python3.9/site-packages/dmlab2d/dmlab2d_pybind.so, 0x0002): tried: '/Users/manuel/opt/anaconda3/envs/meltingpot_env/lib/python3.9/site-packages/dmlab2d/dmlab2d_pybind.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))`

Do you know what can be causing it? 



This works for me:
```
$ git clone git@github.com:deepmind/meltingpot.git
$ cd meltingpot
$ /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m venv meltingpot_venv
$ source ./meltingpot_venv/bin/activate
(meltingpot_venv) $ ./install.sh
```

I'm guessing that some part of your toolchain isn't arm64 so doesn't build `lab2d` for arm64. I don't know what, maybe Bazel?

```
$ bazel version
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
Build label: 5.1.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Mar 24 14:22:07 2022 (1648131727)
Build timestamp: 1648131727
Build timestamp as int: 1648131727
```

See https://github.com/deepmind/lab2d/issues/19 for issues building `lab2d` on M1 chips.

Closing issue as cannot reproduce: meltingpot works for me on M1. It seems like the remaining issues are more with `lab2d` rather than `meltingpot` and the linked issue above seems to cover them.

@jagapiou  Just for the record, the problem was _bazel_. 

After ensuring that I was using an arm version of _bazel_, Meltingpot was installed and ran smoothly on my MAC M1 machine!

Thank you for your support!
I really appreciate it. 


Amazing, glad to hear it worked :-)

Same issue on M1. I solved this issue by reading through previous comments. Thanks @jagapiou and @ManuelRios18 

Hello again!

Sorry for late reply, but the updated versions of "install.sh" and "setup.py" are perfect and solved all my initial issues. Thanks for all information shared above. There is only one remaining minor problem related to a missing folder when I want to test the functionality of meltingpot.

First, I try this line of code:

(meltingpot) asataryd@Aslans-MacBook-Pro meltingpot-main % pytest meltingpot

and it gives the following error:

collected 1218 items / 1 error                                                                                                                      

====================================================================== ERRORS =======================================================================
________________________________________ ERROR collecting meltingpot/python/configs/bots/bot_configs_test.py ________________________________________
meltingpot/python/configs/bots/bot_configs_test.py:39: in <module>
    AVAILABLE_MODELS = frozenset(_models())
meltingpot/python/configs/bots/bot_configs_test.py:33: in _models
    for substrate in _subdirs(models_root):
meltingpot/python/configs/bots/bot_configs_test.py:27: in _subdirs
    for file in os.listdir(root):
E   FileNotFoundError: [Errno 2] No such file or directory: 'meltingpot-main/meltingpot/assets/saved_models'

Then I try this line of code:

pytest -n auto -ra --durations=10 meltingpot

and it gives the following error:

gw0 [1218] / gw1 [1218] / gw2 [1218] / gw3 [1218] / gw4 [1218] / gw5 [1218] / gw6 [1218] / gw7 [1218]                                               
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 11%]
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.F................................................................ [ 23%]
.......F..................................................................................................................................... [ 34%]
......F...........................F.....F.................................................................................................... [ 46%]
................................................................................................................................F.........F.. [ 57%]
....F..............F.......F.................................................FF...........................................F.................. [ 69%]
.......F..................................F................................F...F.........F.........F........F..........F.........F...FFFFFFFF [ 81%]
.F..FF...FF.FF.F.FF.........................................................F.......................F.FF.F.F.FF.F.F.F.F..F....F...FFF..F..FFF [ 92%]
.FF........F.FF............FFFFFF.FFFFFF.FFF.FFF.F.FFFFFFFFFFFFFFFFF..F...................                                                    [100%]
====================================================================== ERRORS =======================================================================
________________________________________ ERROR collecting meltingpot/python/configs/bots/bot_configs_test.py ________________________________________
meltingpot/python/configs/bots/bot_configs_test.py:39: in <module>
    AVAILABLE_MODELS = frozenset(_models())
meltingpot/python/configs/bots/bot_configs_test.py:33: in _models
    for substrate in _subdirs(models_root):
meltingpot/python/configs/bots/bot_configs_test.py:27: in _subdirs
    for file in os.listdir(root):
E   FileNotFoundError: [Errno 2] No such file or directory: 'meltingpot-main/meltingpot/assets/saved_models'

The folder "assets/saved_models" is already missing in the meltingpot repository. Anyway I just wanted to see if any one of you have already tested meltingpot with the provided codes or not, and this is not a crucial issue.





Hello, @aslansd 
Are you using `install.sh`?
[This line](https://github.com/deepmind/meltingpot/blob/ae1568ceead26c9ef1fb55ffd17db36df33c3c31/install.sh#L86) downloads the assets data that you are missing.


Thanks @Manuel! It solved the problem!