isl-org / isl-org/Open3D

pip: Why does Open3D pull in Open3D-ML/requirements.txt?

Open
#2,991 2 comments 3 reactions 0 assignees View on GitHub
build/install ml
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

**Describe the bug**
#2533 was resolved stating that it had minimal dependencies (thank you!).

However, we wanted to update to `open3d==0.10.0`, but ran into #1937 (`JVisualizer`).
So then I wanted to update to `open3d==0.12.0`, but then ran into #2825 (dep on `sklearn`, which hasn't been released yet).

However, I don't understand why the base `Open3D-ML/requirements.txt` is merged into this Python package's requirements:
https://github.com/intel-isl/Open3D/blob/v0.12.0/python/setup.py#L52-L55

Why not use `extras_require` to use the ML dependencies, rather than doing a runtime-switch based on what packages are available? An example:
https://github.com/mikedh/trimesh/blob/4cacbffcd9bd1a637bf05b638bc3376464e3577b/setup.py

e.g.:
```
open3d # Only Open3D deps, no ML stuff
open3d[ml] # ML deps, but does not install PyTorch / TF
open3d[torch] # ML deps + PyTorch
open3d[tensorflow] # ML deps + TF
open3d[all] # All the things!!!
```

**To Reproduce**
See this gist: https://gist.github.com/EricCousineau-TRI/ee119a3feeed77ac289ed06b01e587cc
Important snippet:
```
scikit-learn==0.24.1
# via sklearn
...
sklearn==0.0
# via open3d
```
(Note: `sklearn` isn't important, as I'd expect it to be fixed once a new release is cut; `scikit-learn` is the main thing here)

**Expected behavior**
I would have expected `scikit-learn` to not appear, or only appear of I installed a more explicit version.

**Environment (please complete the following information):**

- Operating system: Ubuntu 18.04
- Python version: Python 3.6
- Open3D version: 0.12.0
- Is this remote workstation? no
- How did you install Open3D? pip

**Additional context**
See linked issues.

\cc @sanskar107 @yxlao

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.