Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_x86_64.whl is not a supported wheel on this platform. #46

Open
soerenbrockmann opened this issue Nov 30, 2020 · 21 comments

Comments

@soerenbrockmann
Copy link

I was trying to install tensorflow macos by running the script according to the instructions:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apple/tensorflow_macos/master/scripts/download_and_install.sh)"

However, I got an error as shown below:

Installing and upgrading base packages.
Requirement already satisfied: pip in ./tensorflow_macos_venv/lib/python3.8/site-packages (20.3)
Requirement already satisfied: wheel in ./tensorflow_macos_venv/lib/python3.8/site-packages (0.35.1)
Requirement already satisfied: setuptools in ./tensorflow_macos_venv/lib/python3.8/site-packages (50.3.2)
Requirement already satisfied: cached-property in ./tensorflow_macos_venv/lib/python3.8/site-packages (1.5.2)
Requirement already satisfied: six in ./tensorflow_macos_venv/lib/python3.8/site-packages (1.15.0)

Installing bundled binary dependencies.
ERROR: numpy-1.18.5-cp38-cp38-macosx_11_0_x86_64.whl is not a supported wheel on this platform.

Any idea how to fix it?

@JLP04
Copy link

JLP04 commented Nov 30, 2020

I also just started seeing this issue but I'm not sure how to fix it.

@kharteveld
Copy link

The problem seems to be that all the bundled wheel files are called macos_11_0, but pip thinks big sur is macOS_10_9. I renamed all the bundled wheel files to macos_10_9 and then it worked.

@ismaproco
Copy link

@kharteveld how did you the renaming? I would like to try it

@soerenbrockmann
Copy link
Author

Alright, I found it.

  1. Download the archive file manually as mention at the README file.
  2. Unpack it and rename all files inside x86_64/ folder. They all contain _11_0. Rename it to _10_16

Screenshot 2020-11-30 at 17 52 23

  1. Open install_venv.sh and rename those filenames (macosx_11_0 to macosx_10_16)
    arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_10_16_x86_64.whl grpcio-1.33.2-cp38-cp38-macosx_10_16_x86_64.whl h5py-2.10.0-cp38-cp38-macosx_10_16_x86_64.whl scipy-1.5.4-cp38-cp38-macosx_10_16_x86_64.whl tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_10_16_x86_64.whl )

  2. Scroll down and rename macosx_11_0 to macosx_10_16

"$python_bin" -m pip install --upgrade --force -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_10_16_$arch.whl

  1. Open terminal, go inside your tensorflow_macos folder and run
    ./install_venv.sh /Users/<your user>/tensorflow_macos_venv/

Those steps worked for me. :-D

@rnogy
Copy link

rnogy commented Dec 1, 2020

I don't think you have to rename it; the trick is just to use -t hack. So you can do like

#!/bin/bash
arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_11_0_x86_64.whl
                   grpcio-1.33.2-cp38-cp38-macosx_11_0_x86_64.whl       
                   h5py-2.10.0-cp38-cp38-macosx_11_0_x86_64.whl
		   scipy-1.5.4-cp38-cp38-macosx_11_0_x86_64.whl  
                   tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_11_0_x86_64.whl
                   tensorflow_macos-0.1a0-cp38-cp38-macosx_11_0_x86_64.whl )

for f in ${arch_list_x86_64[@]} ; do 
"$(which python)" -m pip install --upgrade -t "$(pip show pip | grep Location | cut -c 11-)" --no-dependencies --force "$f"
done

(modified from apple's install_venv.sh script)
on whatever env you're in without using apple's script (which you don't have to install under venv).

@seibert
Copy link

seibert commented Dec 1, 2020

Note that pip 20.3 was released yesterday and may have fixed some of these issues:

https://pip.pypa.io/en/stable/news/#id1

@monikavila
Copy link

Note that pip 20.3 was released yesterday and may have fixed some of these issues:

https://pip.pypa.io/en/stable/news/#id1

It does not solve the problem

@monikavila
Copy link

@soerenbrockmann did your solution work for the new MacBook Pro M1?
Also, I cannot download the files anymore. It seems that they are not available.

@godkaieethu
Copy link

@soerenbrockmann did your solution work for the new MacBook Pro M1?
Also, I cannot download the files anymore. It seems that they are not available.

I have tried, but it seems doesn't work for m1

@nuwansam
Copy link

nuwansam commented Dec 5, 2020

I tried the same in a brand new M1 using python 3.8. I tried installing both architecture types and I get the "is not a supported wheel on this platform" for both (for numpy), which stops the installer.

@soerenbrockmann
Copy link
Author

@monikavila I am working on a MacBookPro16 8-Core Intel Core i9 :-) I haven't tested it on M1. You can find the files here:

https://github.com/apple/tensorflow_macos/releases

Screenshot 2020-12-05 at 09 54 05

However, I am facing lot's of Python dependency issue recently too. Not sure what's going on :-D

@monikavila
Copy link

@monikavila I am working on a MacBookPro16 8-Core Intel Core i9 :-) I haven't tested it on M1. You can find the files here:

https://github.com/apple/tensorflow_macos/releases

Screenshot 2020-12-05 at 09 54 05

However, I am facing lot's of Python dependency issue recently too. Not sure what's going on :-D

Thanks a lot!

@monikavila
Copy link

monikavila commented Dec 5, 2020

I tried the same in a brand new M1 using python 3.8. I tried installing both architecture types and I get the "is not a supported wheel on this platform" for both (for numpy), which stops the installer.

I tried to update to Rosetta 2 and do the whole installation again but it does not work. I also tried to change to macosx_10_16 and I get

ERROR: numpy-1.18.5-cp38-cp38-macosx_10_16_arm64.whl is not a supported wheel on this platform.

I will contact apple support. If you contact apple support also, it would be good and please let me know.

@icenando
Copy link

icenando commented Dec 5, 2020

I tried the same in a brand new M1 using python 3.8. I tried installing both architecture types and I get the "is not a supported wheel on this platform" for both (for numpy), which stops the installer.

I tried to update to Rosetta 2 and do the whole installation again but it does not work. I also tried to change to macosx_10_16 and I get

ERROR: numpy-1.18.5-cp38-cp38-macosx_10_16_arm64.whl is not a supported wheel on this platform.

I will contact apple support. If you contact apple support also, it would be good and please let me know.

Please do update us on how Apple responds to this. I have a feeling they will say it's not their problem and we should contact Google instead.

@icenando
Copy link

icenando commented Dec 6, 2020

So this worked for me: #53 (comment) .

@icenando
Copy link

icenando commented Dec 6, 2020

This (kind of) worked for me:

  • Anaconda is already removed. I used Anaconda_clean.

  • Removed all versions of python and related files from:

    • Applications
    • /Library/Frameworks/Python.framework/Versions
    • /usr/local/bin
  • Uninstalled Xcode

  • Restarted Mac

Checked Python version in Terminal (“python —version): Python 2.7.16 (which I’m guessing is the one that comes embedded in Big Sur.

  • Reinstalled Xcode
  • Ran Xcode-select --install from Terminal.
  • Installed tensor flow again.

Except now I can’t seem to import anything else! I’m getting pages and pages of errors trying to pip install pandas and matplotlib...

@kukupigs
Copy link

  1. ./install_venv.sh /Users//tensorflow_macos_venv/

it's work.good job!

@kabouzeid
Copy link

Just use --python=/usr/bin/python3 in install_venv.sh

@SaschaHeyer
Copy link

Is there any official update on that. Issue still exist and this ticket is now open for more than 1 month.

@Aizen741
Copy link

Aizen741 commented Mar 6, 2021

@SaschaHeyer @monikavila @icenando @soerenbrockmann
Dont create new Virtual Environment under Anaconda. You have to create it under Miniforge

First, get out of the anaconda env , and after you download the miniforge create the Virtual Environment under Miniforge .

Screenshot 2021-03-06 at 10 56 16 AM

Once you create Env in Miniforge this will come . So Don't Close this terminal yet. open a new terminal
Screenshot 2021-03-06 at 11 11 31 AM

Download Additional file

Screenshot 2021-03-06 at 11 05 51 AM

Downloading the Tensorflow : Download tensorflow from releases , Once you download and unzip it open the file and drag - drop install_venv into terminal under the env also add -p in the end. it will ask for the location . provide the same location as the env.

Screenshot 2021-03-06 at 11 15 16 AM

There You go . Tensorflow is working for me perfectly on m1 even in jupyter notebook too

Screenshot 2021-03-06 at 11 19 37 AM

@tinochan
Copy link

The solution by @Aizen741 works! It also works for Jupyter Notebook by creating a new kernel using the virtual environment under Miniforge.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests