pip install from git fails
See original GitHub issueI tested it on several machines in clean conda installations and got exactly the same error message. All machines run Ubuntu 20.04.
pip install git+git://github.com/deepmind/dm_control.git
fails with the following error message
ERROR: Command errored out with exit status 1:
command: /home/kostrikov/miniconda3/envs/test/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-e4i_e72j/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-e4i_e72j/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-celpm6j2/install-record.txt --single-version-externally-managed --compile --install-headers /home/kostrikov/miniconda3/envs/test/include/python3.9/dm-control
cwd: /tmp/pip-req-build-e4i_e72j/
Complete output (41 lines):
running install
running build_mjbindings
Traceback (most recent call last):
File "/tmp/pip-req-build-e4i_e72j/dm_control/autowrap/autowrap.py", line 149, in <module>
app.run(main)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/tmp/pip-req-build-e4i_e72j/dm_control/autowrap/autowrap.py", line 113, in main
parser.parse_consts_typedefs(src)
File "/tmp/pip-req-build-e4i_e72j/dm_control/autowrap/binding_generator.py", line 355, in parse_consts_typedefs
self.recurse_into_conditionals(tokens)
File "/tmp/pip-req-build-e4i_e72j/dm_control/autowrap/binding_generator.py", line 370, in recurse_into_conditionals
self.typedefs_dict.update({token.name: token.typename})
File "/tmp/pip-req-build-e4i_e72j/dm_control/autowrap/codegen_util.py", line 78, in __setitem__
raise ValueError("Key '{}' already exists.".format(k))
ValueError: Key 'mjtNum' already exists.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-e4i_e72j/setup.py", line 176, in <module>
setup(
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-e4i_e72j/setup.py", line 140, in run
self.run_command('build_mjbindings')
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-e4i_e72j/setup.py", line 115, in run
subprocess.check_call(command)
File "/home/kostrikov/miniconda3/envs/test/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/kostrikov/miniconda3/envs/test/bin/python', 'dm_control/autowrap/autowrap.py', '--header_paths=/home/kostrikov/.mujoco/mujoco210/include/mjdata.h /home/kostrikov/.mujoco/mujoco210/include/mjmodel.h /home/kostrikov/.mujoco/mujoco210/include/mjrender.h /home/kostrikov/.mujoco/mujoco210/include/mjui.h /home/kostrikov/.mujoco/mujoco210/include/mjvisualize.h /home/kostrikov/.mujoco/mujoco210/include/mjxmacro.h /home/kostrikov/.mujoco/mujoco210/include/mujoco.h', '--output_dir=/tmp/pip-req-build-e4i_e72j/build/lib/dm_control/mujoco/wrapper/mjbindings']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/kostrikov/miniconda3/envs/test/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-e4i_e72j/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-e4i_e72j/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-celpm6j2/install-record.txt --single-version-externally-managed --compile --install-headers /home/kostrikov/miniconda3/envs/test/include/python3.9/dm-control Check the logs for full command output.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why does pip install from github fail when pip ... - Stack Overflow
I'm guessing this has to do with the unorthodox structure of LammpsIO, whose setup.py file contains: package_dir = {'': 'src'}, packages = find ......
Read more >Error when trying to install package from github repo with ...
Pip is unable to install the package at https://github.com/pyminimp3/pyminimp3 . There's a permission error while cloning its submodule.
Read more >PIP Install Git - A quick read - ActiveState
By default, pip installs packages and all their required dependencies from the Python Package Index (PyPI), using the command: pip install < ...
Read more >Unable to pip install from github repo - Kaggle
I am trying to install pke package in my kernal for doing KPE on text data but getting below error during installation: Command:...
Read more >miuwells - 3D Slicer Community
TotalSegmentator error at first run: "Command 'pip', 'install', 'git+https://github.com/wasserth/TotalSegmentator.git', '–no-deps']' returned ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll push a change to fix this shortly. It turns out that our CI didn’t pick up this bug because we’re running
pip install -r requirements.txt
before buildingdm_control
.For clarity: this issue is not related to the recent upgrade to MuJoCo 2.1. Just bad timing 🙂.
Could you please try replacing https://github.com/deepmind/dm_control/blob/master/setup.py#L196 with
'pyparsing < 3.0.0'
?