title: Error while install dependencies for openai gym in python3.8
body: <p>I am trying to install gym in python3.8.10. Gym installation was successful, but I cannot use it requires several dependencies. I ran <code>sudo pip install gym[all]</code> to install the required dependencies for gym, and it throws error which I don't understand.</p>
  <pre><code>Building wheels for collected packages: box2d-py, mujoco-py
    Building wheel for box2d-py (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d /tmp/pip-wheel-4z4tdgw2
         cwd: /tmp/pip-install-8zlg9dw8/box2d-py/
    Complete output (17 lines):
    Using setuptools (version 45.2.0).
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/Box2D
    copying library/Box2D/Box2D.py -&gt; build/lib.linux-x86_64-3.8/Box2D
    copying library/Box2D/__init__.py -&gt; build/lib.linux-x86_64-3.8/Box2D
    creating build/lib.linux-x86_64-3.8/Box2D/b2
    copying library/Box2D/b2/__init__.py -&gt; build/lib.linux-x86_64-3.8/Box2D/b2
    running build_ext
    building 'Box2D._Box2D' extension
    swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
    swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
    unable to execute 'swig': No such file or directory
    error: command 'swig' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for box2d-py
    Running setup.py clean for box2d-py
    Building wheel for mujoco-py (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-8zlg9dw8/mujoco-py/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-8zlg9dw8/mujoco-py/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d /tmp/pip-wheel-anrwwl47
         cwd: /tmp/pip-install-8zlg9dw8/mujoco-py/
    Complete output (27 lines):
    running bdist_wheel
    running build
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;/tmp/pip-install-8zlg9dw8/mujoco-py/setup.py&quot;, line 32, in &lt;module&gt;
        setup(
      File &quot;/usr/lib/python3/dist-packages/setuptools/__init__.py&quot;, line 144, in setup
        return distutils.core.setup(**attrs)
      File &quot;/usr/lib/python3.8/distutils/core.py&quot;, line 148, in setup
        dist.run_commands()
      File &quot;/usr/lib/python3.8/distutils/dist.py&quot;, line 966, in run_commands
        self.run_command(cmd)
      File &quot;/usr/lib/python3.8/distutils/dist.py&quot;, line 985, in run_command
        cmd_obj.run()
      File &quot;/usr/lib/python3/dist-packages/wheel/bdist_wheel.py&quot;, line 223, in run
        self.run_command('build')
      File &quot;/usr/lib/python3.8/distutils/cmd.py&quot;, line 313, in run_command
        self.distribution.run_command(command)
      File &quot;/usr/lib/python3.8/distutils/dist.py&quot;, line 985, in run_command
        cmd_obj.run()
      File &quot;/tmp/pip-install-8zlg9dw8/mujoco-py/setup.py&quot;, line 28, in run
        import mujoco_py  # noqa: force build
      File &quot;/tmp/pip-install-8zlg9dw8/mujoco-py/mujoco_py/__init__.py&quot;, line 3, in &lt;module&gt;
        from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
      File &quot;/tmp/pip-install-8zlg9dw8/mujoco-py/mujoco_py/builder.py&quot;, line 16, in &lt;module&gt;
        from cffi import FFI
    ModuleNotFoundError: No module named 'cffi'
    ----------------------------------------
    ERROR: Failed building wheel for mujoco-py
    Running setup.py clean for mujoco-py
  Failed to build box2d-py mujoco-py
  Installing collected packages: opencv-python, box2d-py, pyglet, zipp, importlib-resources, ale-py, pycparser, cffi, glfw, imageio, mujoco-py, lz4
      Running setup.py install for box2d-py ... error
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /tmp/pip-record-oafevxzn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/box2d-py
           cwd: /tmp/pip-install-8zlg9dw8/box2d-py/
      Complete output (17 lines):
      Using setuptools (version 45.2.0).
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/Box2D
      copying library/Box2D/Box2D.py -&gt; build/lib.linux-x86_64-3.8/Box2D
      copying library/Box2D/__init__.py -&gt; build/lib.linux-x86_64-3.8/Box2D
      creating build/lib.linux-x86_64-3.8/Box2D/b2
      copying library/Box2D/b2/__init__.py -&gt; build/lib.linux-x86_64-3.8/Box2D/b2
      running build_ext
      building 'Box2D._Box2D' extension
      swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
      swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
      unable to execute 'swig': No such file or directory
      error: command 'swig' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-8zlg9dw8/box2d-py/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /tmp/pip-record-oafevxzn/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/box2d-py Check the logs for full command output.
  </code></pre>
  <p>What maybe the underlying cause of this issue? Should I install the dependencies one by one to prevent this from happening?</p>