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

Cannot pipx install Rye on Mac ARM #690

Closed
MartinBernstorff opened this issue Feb 19, 2024 · 6 comments
Closed

Cannot pipx install Rye on Mac ARM #690

MartinBernstorff opened this issue Feb 19, 2024 · 6 comments

Comments

@MartinBernstorff
Copy link

Steps to Reproduce

  1. pipx install rye
  2. Failed to install (see logs below)

Expected Result

Rye installed

Actual Result

It seems this is because of the pyyaml dependency having to be built, more details here.

pipx logs
PIP STDOUT
----------
Collecting rye
  Using cached rye-0.6.1-py3-none-any.whl (10.0 kB)
Collecting click<8.0,>=7.0 (from rye)
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting colorama<0.5,>=0.4 (from rye)
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting importlib_metadata<0.24,>=0.23 (from rye)
  Using cached importlib_metadata-0.23-py2.py3-none-any.whl (28 kB)
Collecting pyyaml<6.0.0,>=5.1.2 (from rye)
  Using cached PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/Users/au484925/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/au484925/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/au484925/.local/pipx/shared/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/private/var/folders/x_/0p86tfx147v1whg6_8pd_kl4txn7s6/T/pip-build-env-93gkr0x0/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [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.

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

Version Info

Latest

Stacktrace

No response

@MartinBernstorff
Copy link
Author

After using the workaround linked above with the "inline constraint", running rye gives:

➜  rye init       
Traceback (most recent call last):
  File "/Users/au484925/.local/bin/rye", line 5, in <module>
    from rye.__main__ import cli
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/rye/__main__.py", line 4, in <module>
    from settingscascade import SettingsManager
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/settingscascade/__init__.py", line 2, in <module>
    from settingscascade.manager import SettingsManager
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/settingscascade/manager.py", line 4, in <module>
    from jinja2 import Environment
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/jinja2/nodes.py", line 19, in <module>
    from jinja2.utils import Markup
  File "/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/jinja2/utils.py", line 642, in <module>
    from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/Users/au484925/.local/pipx/venvs/rye/lib/python3.11/site-packages/markupsafe/__init__.py)

@MartinBernstorff
Copy link
Author

MartinBernstorff commented Feb 19, 2024

The install in the readme works well! Is pip install unsupported?

@MartinBernstorff MartinBernstorff changed the title Cannot install Rye on Mac ARM Cannot pipx install Rye on Mac ARM Feb 19, 2024
@jooon
Copy link

jooon commented Feb 19, 2024

rye on pypi is a completely different tool. The installation options are piping curl to bash or compile with cargo.

Maybe a small warning is needed close to the installation instructions.

@jooon
Copy link

jooon commented Feb 19, 2024

Also, after you have installed rye, you no longer need pipx. :)

@MartinBernstorff
Copy link
Author

Excellent, thanks! Unsure if this should stay open as a reminder, feel free to close 👍

@mitsuhiko
Copy link
Collaborator

Rye intentionally is not published to pypi as it intends on bootstrapping Python itself. This might change later, but for now this is very much intended.

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