Skip to content

pls help with pip install gym[all] #843

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

Closed
Sandy4321 opened this issue Apr 24, 2020 · 4 comments
Closed

pls help with pip install gym[all] #843

Sandy4321 opened this issue Apr 24, 2020 · 4 comments

Comments

@Sandy4321
Copy link

error is on windows 10:
E:\WINPYTHON_FULL_apr22\WPy64-3770\scripts>pip install gym[all]
Requirement already satisfied: gym[all] in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (0.17.1)
Requirement already satisfied: numpy>=1.10.4 in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (1.18.2+mkl)
Requirement already satisfied: cloudpickle<1.4.0,>=1.2.0 in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (1.3.0)
Requirement already satisfied: scipy in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (1.4.1)
Requirement already satisfied: pyglet<=1.5.0,>=1.4.0 in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (1.5.0)
Requirement already satisfied: six in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (1.14.0)
Collecting atari-py~=0.2.0; extra == "all"
Downloading atari_py-0.2.6-cp37-cp37m-win_amd64.whl (1.8 MB)
|████████████████████████████████| 1.8 MB 656 kB/s
Collecting mujoco-py<2.0,>=1.50; extra == "all"
Downloading mujoco-py-1.50.1.68.tar.gz (120 kB)
|████████████████████████████████| 120 kB 6.8 MB/s
Collecting box2d-py~=2.3.5; extra == "all"
Downloading box2d-py-2.3.8.tar.gz (374 kB)
|████████████████████████████████| 374 kB ...
Requirement already satisfied: imageio; extra == "all" in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (2.8.0)
Requirement already satisfied: Pillow; extra == "all" in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from gym[all]) (7.0.0)
Collecting opencv-python; extra == "all"
Downloading opencv_python-4.2.0.34-cp37-cp37m-win_amd64.whl (33.0 MB)
|████████████████████████████████| 33.0 MB 819 kB/s
Requirement already satisfied: future in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from pyglet<=1.5.0,>=1.4.0->gym[all]) (0.18.2)
Collecting glfw>=1.4.0
Downloading glfw-1.11.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-win_amd64.whl (492 kB)
|████████████████████████████████| 492 kB 3.3 MB/s
Requirement already satisfied: Cython>=0.27.2 in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from mujoco-py<2.0,>=1.50; extra == "all"->gym[all]) (0.29.15)
Requirement already satisfied: cffi>=1.10 in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from mujoco-py<2.0,>=1.50; extra == "all"->gym[all]) (1.14.0)
Collecting lockfile>=0.12.2
Downloading lockfile-0.12.2-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: pycparser in e:\winpython_full_apr22\wpy64-3770\python-3.7.7.amd64\lib\site-packages (from cffi>=1.10->mujoco-py<2.0,>=1.50; extra == "all"->gym[all]) (2.20)
Building wheels for collected packages: mujoco-py, box2d-py
Building wheel for mujoco-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"'; file='"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sndr\AppData\Local\Temp\pip-wheel-5jiwopt6'
cwd: C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py
Complete output (27 lines):
running bdist_wheel
running build
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py", line 44, in
tests_require=read_requirements_file('requirements.dev.txt'),
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\site-packages\setuptools_init_.py", line 144, in setup
return distutils.core.setup(**attrs)
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
self.run_command('build')
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py", line 28, in run
import mujoco_py # noqa: force build
File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\mujoco_py_init_.py", line 3, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\mujoco_py\builder.py", line 20, in
from lockfile import LockFile
ModuleNotFoundError: No module named 'lockfile'

ERROR: Failed building wheel for mujoco-py
Running setup.py clean for mujoco-py
Building wheel for box2d-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\box2d-py\setup.py'"'"'; file='"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\box2d-py\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sndr\AppData\Local\Temp\pip-wheel-lrgkhbru'
cwd: C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\box2d-py
Complete output (16 lines):
Using setuptools (version 46.0.0).
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Box2D
copying library\Box2D\Box2D.py -> build\lib.win-amd64-3.7\Box2D
copying library\Box2D_init_.py -> build\lib.win-amd64-3.7\Box2D
creating build\lib.win-amd64-3.7\Box2D\b2
copying library\Box2D\b2_init_.py -> build\lib.win-amd64-3.7\Box2D\b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
swig.exe -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
error: command 'swig.exe' failed: No such file or directory

ERROR: Failed building wheel for box2d-py
Running setup.py clean for box2d-py
Failed to build mujoco-py box2d-py
Installing collected packages: atari-py, glfw, lockfile, mujoco-py, box2d-py, opencv-python
Running setup.py install for mujoco-py ... error
ERROR: Command errored out with exit status 1:
command: 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"'; file='"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\sndr\AppData\Local\Temp\pip-record-iavd20ki\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\Include\mujoco-py'
cwd: C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py
Complete output (56 lines):
running install
running build

You appear to be missing MuJoCo.  We expected to find the file here: E:\WINPYTHON_FULL_apr22\WPy64-3770\settings\.mujoco\mjpro150

This package only provides python bindings, the library must be installed separately.

Please follow the instructions on the README to install MuJoCo

    https://github.com/openai/mujoco-py#install-mujoco

Which can be downloaded from the website

    https://www.roboti.us/index.html

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py", line 44, in <module>
    tests_require=read_requirements_file('requirements.dev.txt'),
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py", line 28, in run
    import mujoco_py  # noqa: force build
  File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\mujoco_py\__init__.py", line 3, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\mujoco_py\builder.py", line 502, in <module>
    mjpro_path, key_path = discover_mujoco()
  File "C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\mujoco_py\utils.py", line 93, in discover_mujoco
    raise Exception(message)
Exception:
You appear to be missing MuJoCo.  We expected to find the file here: E:\WINPYTHON_FULL_apr22\WPy64-3770\settings\.mujoco\mjpro150

This package only provides python bindings, the library must be installed separately.

Please follow the instructions on the README to install MuJoCo

    https://github.com/openai/mujoco-py#install-mujoco

Which can be downloaded from the website

    https://www.roboti.us/index.html

----------------------------------------

ERROR: Command errored out with exit status 1: 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"'; file='"'"'C:\Users\sndr\AppData\Local\Temp\pip-install-sql0jwqj\mujoco-py\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\sndr\AppData\Local\Temp\pip-record-iavd20ki\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\WINPYTHON_FULL_apr22\WPy64-3770\python-3.7.7.amd64\Include\mujoco-py' Check the logs for full command output.

E:\WINPYTHON_FULL_apr22\WPy64-3770\scripts>

@Sandy4321
Copy link
Author

any ideas
for example
openai/gym#1603
You might ensure you editing PATH under "System Variables" (the bottom section, not the top). You add the folder containing swig.exe. New command prompts should have access to swig.exe. Maybe you need to restart? Windows is strange

@hg0428
Copy link

hg0428 commented May 10, 2020

I have the same problem and have looked for days, no answer that works

@stonebig
Copy link
Contributor

openai/gym#11

@stonebig
Copy link
Contributor

stonebig commented May 4, 2025

apparently, gym as move to gymnasium https://github.com/Farama-Foundation/Gymnasium

@stonebig stonebig closed this as completed May 4, 2025
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

3 participants