Closed colindean closed 1 year ago
I was able to install successfully on my machine by altering the requirements.txt as suggested above and referencing my fork, e.g.
[tool.poetry.dependencies]
nsfw-detector = { git = "https://github.com/colindean/nsfw_model_macos.git", branch = "tensorflow_macos" }
I'll put up a PR for it.
I'd like to install
nsfw-detector
on my Apple Silicon Mac. It appears to pull intensorflow
, which has no installation candidate for arm64 Macs as of 2.11.0.I realize that this is more of a
tensorflow
packaging problem thannsfw-detector
, but I think there's an acceptable workaround. See below.Current behavior
I'm specifying the dependency in
pyproject.toml
for retrieval with Poetry:When I run
poetry update
to install it:It's because
nsfw-detector
has a hard dependency on tensorflow:And
tensorflow
has no macos*arm64 packages listed in the files for 2.11.0.Expected behavior
It'd be lovely for
nsfw-detector
to requiretensorflow_macos
automatically through markers in the requirements.txt thatnsfw-detector
uses.Alternatively, I'd could specify an extra that will use
tensorflow_macos
instead oftensorflow
.I'm unfamiliar with handling that in setup.py since the
tensorflow
dependency would have to be dropped from the REQUIRED section read from requirements.txt when themacos
extra flag is requested. Maybe tensorflow could be added as a default extra? Not sure how best to proceed here.System info