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

Failed building wheel for dm-tree #1442

Closed
haydenshively opened this issue May 28, 2020 · 15 comments
Closed

Failed building wheel for dm-tree #1442

haydenshively opened this issue May 28, 2020 · 15 comments
Labels
macos issues related to MacOS support (best-effort) packaging
Milestone

Comments

@haydenshively
Copy link
Member

Installing garage dependencies into a fresh conda environment (Python 3.8) via pip install --no-cache -e ."[mujoco,dm_control]" yields the following errors related to dm-tree. These may or may not be specific to my computer/macOS, but they are reproducible in every fresh conda env that I make. If instead I try to install from PyPI (pip install --no-cache -e garage"[mujoco,dm_control]"), it says Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI since dm_control is from deepmind's repo.

ERROR: Command errored out with exit status 1:
command: /Users/haydenshively/anaconda3/envs/Garage/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/setup.py'"'"'; file='"'"'/private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/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 /private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-wheel-5hwif72_
cwd: /private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/
Complete output (13 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/init.py -> build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/tree_test.py -> build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/tree_benchmark.py -> build/lib.macosx-10.9-x86_64-3.8/tree
running build_ext
bazel build //tree:_tree --symlink_prefix=build/temp.macosx-10.9-x86_64-3.8/bazel- --compilation_mode=opt
unable to execute 'bazel': No such file or directory
error: command 'bazel' failed with exit status 1


ERROR: Command errored out with exit status 1:
command: /Users/haydenshively/anaconda3/envs/Garage/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/setup.py'"'"'; file='"'"'/private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-record-bgk0rzmx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/haydenshively/anaconda3/envs/Garage/include/python3.8/dm-tree
cwd: /private/var/folders/hz/1l2dtvyj4dv35mys1v9y2nd40000gn/T/pip-install-mk32dmoe/dm-tree/
Complete output (13 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/init.py -> build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/tree_test.py -> build/lib.macosx-10.9-x86_64-3.8/tree
copying tree/tree_benchmark.py -> build/lib.macosx-10.9-x86_64-3.8/tree
running build_ext
bazel build //tree:_tree --symlink_prefix=build/temp.macosx-10.9-x86_64-3.8/bazel- --compilation_mode=opt
unable to execute 'bazel': No such file or directory
error: command 'bazel' failed with exit status 1

@haydenshively haydenshively added packaging macos issues related to MacOS support (best-effort) labels May 28, 2020
@haydenshively
Copy link
Member Author

It seems that dm-tree is not compatible with Python 3.8: google-deepmind/dm_control#135
We should probably specify compatible Python versions in the installation instructions.

@ryanjulian
Copy link
Member

ryanjulian commented May 28, 2020

Great catch! The best way for us to specify this is to update setup.py

In particular, you'll want python_requires='>=3.5,<3.8

why don't you give it a shot?

@ryanjulian
Copy link
Member

(you should also leave a comment explaining 3.8 is unsupported, with a link to the issue you found)

@gitanshu
Copy link
Contributor

The issue is that compiling dm-tree from source requires installing bazel. So it's not that we are not compatible with python 3.8, but that on 3.8, we have an extra system dependency. Do you think we should still restrict our supported range of python versions for that?

@haydenshively
Copy link
Member Author

I’m happy to modify the setup.py either way. It’s be great to support 3.8 by adding the bazel dependency, but on the other hand we already have a lot of dependencies, and the bazel binary is rather large (~120mb). Let me know which way to go.

@ryanjulian
Copy link
Member

The root of the problem is not bazel, but DeepMind failing to upload a pre-compiled wheel for Python 3.8 to PyPI, causing pip to revert to trying to compile some native extensions from source code (which requires bazel).

We should probably just wait for them to upload the wheel.

Until then, we should at least properly declare that not all configurations support Python 3.8.

@ryanjulian
Copy link
Member

This should be fixed -- check again?

@haydenshively
Copy link
Member Author

Yep. Looks like it's working now

@xwy0303
Copy link

xwy0303 commented Sep 13, 2023

Hello. I have the same problem with you, but The version of python on my computer is 3.6. Do you know why? Thanks!
image

@mi-heinsch
Copy link

Hey, I have the same issue with Python 3.6.9.. Anyone has a fix already?

@aymen5507
Copy link

any update?

@shikharmittal04
Copy link

Same issue here. I have Python 3.6.8

@rauki34
Copy link

rauki34 commented Jan 25, 2024

oh,damn. same problem in 3.12 when I use pip install keras. Where is the solution?

@shikharmittal04
Copy link

Upgrading to Python 3.11.5 solved the problem for me.

@rauki34
Copy link

rauki34 commented Jan 25, 2024

Upgrading to Python 3.11.5 solved the problem for me.

success right now amazingly while I still do not know what problem it happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos issues related to MacOS support (best-effort) packaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants