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

[BUG]: can't install on apple silicon Mac KeyError: 'platform macosx-12-arm64 is not supported by robotpy-build! #45

Open
mduaneh opened this issue Feb 17, 2022 · 7 comments

Comments

@mduaneh
Copy link

mduaneh commented Feb 17, 2022

Problem description

Using cached robotpy-wpiutil-2022.3.1.2.tar.gz (12 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
Traceback (most recent call last):
File "/private/var/folders/yb/5tvxb35x78x3xljypp4np1fc0000gn/T/pip-build-env-vddho4fx/overlay/lib/python3.9/site-packages/robotpy_build/platforms.py", line 85, in get_platform
return _platforms[name]
KeyError: 'macosx-12-arm64'

Operating System

MacOS

Installed Python Packages

No response

Reproducible example code

pip3 install robotpy
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting robotpy
  Using cached robotpy-2022.0.54-py3-none-any.whl (3.2 kB)
Collecting pyfrc<2023.0.0,>=2022.0.0
  Downloading pyfrc-2022.0.2-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.1/48.1 KB 806.2 kB/s eta 0:00:00
Collecting robotpy-wpiutil<2023.0.0,>=2022.3.1.2
  Using cached robotpy-wpiutil-2022.3.1.2.tar.gz (12 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      Traceback (most recent call last):
        File "/private/var/folders/yb/5tvxb35x78x3xljypp4np1fc0000gn/T/pip-build-env-vddho4fx/overlay/lib/python3.9/site-packages/robotpy_build/platforms.py", line 85, in get_platform
          return _platforms[name]
      KeyError: 'macosx-12-arm64'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 267, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/opt/homebrew/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 5, in <module>
          setup()
        File "/private/var/folders/yb/5tvxb35x78x3xljypp4np1fc0000gn/T/pip-build-env-vddho4fx/overlay/lib/python3.9/site-packages/robotpy_build/setup.py", line 212, in setup
          s = Setup()
        File "/private/var/folders/yb/5tvxb35x78x3xljypp4np1fc0000gn/T/pip-build-env-vddho4fx/overlay/lib/python3.9/site-packages/robotpy_build/setup.py", line 46, in __init__
          self.platform = get_platform()
        File "/private/var/folders/yb/5tvxb35x78x3xljypp4np1fc0000gn/T/pip-build-env-vddho4fx/overlay/lib/python3.9/site-packages/robotpy_build/platforms.py", line 87, in get_platform
          raise KeyError(f"platform {name} is not supported by robotpy-build!")
      KeyError: 'platform macosx-12-arm64 is not supported by robotpy-build!'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
@virtuald
Copy link
Member

WPILib does not currently support apple arm, you'll need to use a VM or something else.

@TheTripleV
Copy link
Member

WPILib and by extension robotpy are currently only distributed for x86/64 architectures. arm64 is not supported. Please install the x64 version of python and try again.

@virtuald
Copy link
Member

Oh interesting, do you think the x64 python would work on an Apple ARM machine?

@TheTripleV
Copy link
Member

I've heard that x64 WPILib works fine through Rosetta so am assuming Python would too. I don't have an ARM Mac to try for myself.

@mduaneh
Copy link
Author

mduaneh commented Feb 17, 2022

I haven't tried it yet, but you'd want to start by doing something like:
arch -x86_64 /usr/local/bin/brew install python

@virtuald
Copy link
Member

Any luck?

@mduaneh
Copy link
Author

mduaneh commented Feb 18, 2022

I already had an x86 version of python installed using the command above.

  • arch -x86_64 /usr/local/bin/pip3 install -U robotpy
    • Works
  • Now I'm trying to get cscore installed locally to be able to iterate on the Mac
    • arch -x86_64 robotpy-installer download robotpy-cscore
    • Works

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

No branches or pull requests

3 participants