Skip to content

Can't install on Python 3.9 on a M1 Mac using Poetry #38

Description

I am trying to install on a M1 Mac under Python 3.9.13 using the Poetry package manager.
Installing works when I use pip install verstack, but poetry is a very popular option nowadays, so ideally the package should be able to install.

I have a blank virtual environment:

[tool.poetry]
name = "trying-out-verstack"
version = "0.0.1"
description = "Trying out the Verstack library, a library for helping data scientists with common tasks."
authors = ["Some name <some.name@email.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.9.12,<3.13"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

I add verstack using the command poetry add verstack.

This is the error:

[a lot of lines left out]
  no previously-included directories found matching 'benchmarks/numpy'
  warning: no previously-included files matching '*.pyo' found anywhere in distribution
  warning: no previously-included files matching '*.pyd' found anywhere in distribution
  warning: no previously-included files matching '*.swp' found anywhere in distribution
  warning: no previously-included files matching '*.bak' found anywhere in distribution
  warning: no previously-included files matching '*~' found anywhere in distribution
  warning: no previously-included files found matching 'LICENSES_bundled.txt'
  writing manifest file 'numpy.egg-info/SOURCES.txt'
  Copying numpy.egg-info to build/bdist.macosx-13.5-arm64/wheel/numpy-1.19.5-py3.9.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "/Users/allanlrh/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/allanlrh/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/allanlrh/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 211, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 248, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/setuptools/build_meta.py", line 142, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 508, in <module>
      setup_package()
    File "setup.py", line 500, in setup_package
      setup(**metadata)
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpphzcec02/numpy-1.19.5/numpy/distutils/core.py", line 169, in setup
      return old_setup(**new_attr)
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 165, in setup
      return distutils.core.setup(**attrs)
    File "/Users/allanlrh/.pyenv/versions/3.9.13/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/allanlrh/.pyenv/versions/3.9.13/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/allanlrh/.pyenv/versions/3.9.13/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 328, in run
      impl_tag, abi_tag, plat_tag = self.get_tag()
    File "/private/var/folders/y2/cb1g865x0rz5yzq5vtqthrgh0000gn/T/tmpt1z3iq_i/.venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
      assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
  AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_13_5_arm64')
  

  at ~/Library/Application Support/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/chef.py:166 in _prepare
      162│ 
      163│                 error = ChefBuildError("\n\n".join(message_parts))
      164│ 
      165│             if error is not None:
    → 166│                 raise error from None
      167│ 
      168│             return path
      169│ 
      170│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with numpy (1.19.5) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "numpy (==1.19.5)"'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions