Kohulan / DECIMER-Image_Transformer

DECIMER: Deep Learning for Chemical Image Recognition using Efficient-Net V2 + Transformer
MIT License
197 stars 51 forks source link

setup.py tensor flow install for macOS not working for macOS Montery (Apple M1) #102

Closed reskyner closed 4 months ago

reskyner commented 5 months ago

Issue Type

Bug

Source

GitHub (source)

DECIMER Image Transformer Version

master branch

OS Platform and Distribution

macOS Monterey v12.6.5

Python version

3.10

Current Behaviour?

(STOUT) rachaelskyner@Rachaels-MacBook-Air IWOMI_Tutorials % pip install git+https://github.com/Kohulan/DECIMER-Image_Transformer.git
Collecting git+https://github.com/Kohulan/DECIMER-Image_Transformer.git
  Cloning https://github.com/Kohulan/DECIMER-Image_Transformer.git to /private/var/folders/f2/fm_kr1g93tv15s6bj55fdqd40000gn/T/pip-req-build-pnwxeyw2
  Running command git clone --filter=blob:none --quiet https://github.com/Kohulan/DECIMER-Image_Transformer.git /private/var/folders/f2/fm_kr1g93tv15s6bj55fdqd40000gn/T/pip-req-build-pnwxeyw2
  Resolved https://github.com/Kohulan/DECIMER-Image_Transformer.git to commit 41138bead4a0e234f83e73f65639331b81aa32a8
  Preparing metadata (setup.py) ... done
INFO: pip is looking at multiple versions of decimer to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tensorflow-macos<=2.15.0,>=2.10.0 (from decimer) (from versions: none)
ERROR: No matching distribution found for tensorflow-macos<=2.15.0,>=2.10.0

I can get it to work if I manually pip install tensorflow and change the setup.py to:

# if (
#    platform.processor() == "arm" or platform.processor() == "i386"
#) and platform.system() == "Darwin":
#    tensorflow_os = "tensorflow-macos>=2.10.0,<=2.15.0"
#else:
tensorflow_os = "tensorflow>=2.12.0,<=2.15.0"

Which images caused the issue? (This is mandatory for images related issues)

No response

Standalone code to reproduce the issue

pip install git+https://github.com/Kohulan/DECIMER-Image_Transformer.git

Relevant log output

No response

Code of Conduct

reskyner commented 5 months ago

Seems to be a known issue above python 3.8: https://forums.developer.apple.com/forums/thread/683757