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

Not able to pip install the master version of the theme. #537

Closed
rexwangcc opened this issue Jan 6, 2022 · 7 comments · Fixed by #552
Closed

Not able to pip install the master version of the theme. #537

rexwangcc opened this issue Jan 6, 2022 · 7 comments · Fixed by #552

Comments

@rexwangcc
Copy link

rexwangcc commented Jan 6, 2022

Hi! Thank you so much for the elegant theme! I run into an issue when trying to use the version-switcher template and figured it might come in after the latest version was released on PyPI; while trying to pip install git+https://github.com/pydata/pydata-sphinx-theme.git@master following the installation guide, I ran into another issue saying that:

ERROR: Could not build wheels for pydata-sphinx-theme, which is required to install pyproject.toml-based projects

I have checked my pip version is the latest which is supposed to support pyproject tomls, so do I have to switch to something like poetry, or am I missing anything here? Thanks!!

@drammock
Copy link
Collaborator

drammock commented Jan 6, 2022

possible duplicate of #523, which was just resolved 2 days ago. @rexwangcc can you say more about your system details, the command you used when you tried to install, and provide the full traceback of the error? (see here for an example of what lines of output are most useful... basically from Building wheels for collected packages... up to the error)

@rexwangcc
Copy link
Author

rexwangcc commented Jan 7, 2022

Thanks for the prompt reply, I'm using an M1 mac with macOS 11.4, while the Python version is a 3.8.9 virtual env. The traceback is rather unexpectedly cumbersome, but it looks like it got a 404 while creating the nodeenv, not sure if it helps to include it:

Building wheel for pydata-sphinx-theme (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/***/SDK/Py3Env/bin/python3 /Users/***/SDK/Py3Env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/tmp1yo9n31e
       cwd: /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-req-build-kfqbjciv
  Complete output (405 lines):
  [stb] # nodeenv does not exist.
  [stb] # Generating new nodeenv with NodeJS 14.18.1!
  [stb] $ python -m nodeenv --node=14.18.1 --prebuilt --clean-src /private/var/fol
  ders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-req-build-kfqbjciv/.nodeenv
   * Install prebuilt node (14.18.1) .
  ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
  │ <string>:12 in <module>                                                      │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │ __annotations__ = {}                                                     │ │
  │ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
  │ │         __doc__ = None                                                   │ │
  │ │      __loader__ = <class '_frozen_importlib.BuiltinImporter'>            │ │
  │ │        __name__ = '__main__'                                             │ │
  │ │     __package__ = None                                                   │ │
  │ │        __spec__ = None                                                   │ │
  │ │            rich = <module 'rich' from                                    │ │
  │ │                   '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000… │ │
  │ │           runpy = <module 'runpy' from                                   │ │
  │ │                   '/Library/Developer/CommandLineTools/Library/Framewor… │ │
  │ │          urllib = <module 'urllib' from                                  │ │
  │ │                   '/Library/Developer/CommandLineTools/Library/Framewor… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/runpy.py:207 in run_module                           │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/runpy.py:97 in _run_module_code                      │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/runpy.py:87 in _run_code                             │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:1494 in <module>          │
  │                                                                              │
  │   1491 """                                                                   │
  │   1492                                                                       │
  │   1493 if __name__ == '__main__':                                            │
  │ ❱ 1494 │   main()                                                            │
  │   1495                                                                       │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │                 __builtins__ = {                                         │ │
  │ │                                │   '__name__': 'builtins',               │ │
  │ │                                │   '__doc__': 'Built-in functions,       │ │
  │ │                                exceptions, and other                     │ │
  │ │                                objects.\n\nNoteworthy: None is the       │ │
  │ │                                `nil'+46,                                 │ │
  │ │                                │   '__package__': '',                    │ │
  │ │                                │   '__loader__': <class                  │ │
  │ │                                '_frozen_importlib.BuiltinImporter'>,     │ │
  │ │                                │   '__spec__':                           │ │
  │ │                                ModuleSpec(name='builtins', loader=<class │ │
  │ │                                '_frozen_importlib.BuiltinImporter'>),    │ │
  │ │                                │   '__build_class__': <built-in function │ │
  │ │                                __build_class__>,                         │ │
  │ │                                │   '__import__': <built-in function      │ │
  │ │                                __import__>,                              │ │
  │ │                                │   'abs': <built-in function abs>,       │ │
  │ │                                │   'all': <built-in function all>,       │ │
  │ │                                │   'any': <built-in function any>,       │ │
  │ │                                │   ... +142                              │ │
  │ │                                }                                         │ │
  │ │                   __cached__ = '/Users/***/Library/Caches/com.app… │ │
  │ │                      __doc__ = '\n    nodeenv\n    ~~~~~~~\n    Node.js  │ │
  │ │                                virtual environment\n\n    :copyright:    │ │
  │ │                                (c) 20'+70                                │ │
  │ │                     __file__ = '/private/var/folders/52/jqtk04q94kqcptn… │ │
  │ │                   __loader__ = <_frozen_importlib_external.SourceFileLo… │ │
  │ │                                object at 0x10359e5e0>                    │ │
  │ │                     __name__ = '__main__'                                │ │
  │ │                  __package__ = ''                                        │ │
  │ │                     __spec__ = ModuleSpec(name='nodeenv',                │ │
  │ │                                loader=<_frozen_importlib_external.Sourc… │ │
  │ │                                object at 0x10359e5e0>,                   │ │
  │ │                                origin='/private/var/folders/52/jqtk04q9… │ │
  │ │           _get_versions_json = <function _get_versions_json at           │ │
  │ │                                0x103bea310>                              │ │
  │ │                      abspath = <function abspath at 0x102a093a0>         │ │
  │ │                 ACTIVATE_BAT = '\n@echo off\nset                         │ │
  │ │                                "NODE_VIRTUAL_ENV=__NODE_VIRTUAL_ENV__"\… │ │
  │ │                                not defined PROMPT (\n '+513              │ │
  │ │                ACTIVATE_FISH = '\n\n# This file must be used with        │ │
  │ │                                "source bin/activate.fish" *from fish*\n# │ │
  │ │                                you can'+4141                             │ │
  │ │                 ACTIVATE_PS1 = '\nfunction global:deactivate             │ │
  │ │                                ([switch]$NonDestructive) {\n    # Revert │ │
  │ │                                to original'+1306                         │ │
  │ │                  ACTIVATE_SH = '\n\n# This file must be used with        │ │
  │ │                                "source bin/activate" *from bash*\n# you  │ │
  │ │                                cannot r'+3608                            │ │
  │ │          build_node_from_src = <function build_node_from_src at          │ │
  │ │                                0x103bdcdc0>                              │ │
  │ │                       callit = <function callit at 0x103bdc790>          │ │
  │ │                 clear_output = <function clear_output at 0x103bb1d30>    │ │
  │ │                       Config = <class '__main__.Config'>                 │ │
  │ │                 ConfigParser = <class 'configparser.ConfigParser'>       │ │
  │ │                   contextlib = <module 'contextlib' from                 │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │      copy_node_from_prebuilt = <function copy_node_from_prebuilt at      │ │
  │ │                                0x103bdcd30>                              │ │
  │ │                     copytree = <function copytree at 0x103bdcca0>        │ │
  │ │           create_environment = <function create_environment at           │ │
  │ │                                0x103bea280>                              │ │
  │ │                create_logger = <function create_logger at 0x103bdc550>   │ │
  │ │                  CYGWIN_NODE = '#!/bin/sh\n\nif [ -r "$1" ]; then\n      │ │
  │ │                                SCRIPT_PATH=$(cygpath -w "$1")\n          │ │
  │ │                                shift\n   '+84                            │ │
  │ │               DEACTIVATE_BAT = '@echo off\nif defined                    │ │
  │ │                                _OLD_VIRTUAL_PROMPT (\n    set            │ │
  │ │                                "PROMPT=%_OLD_VIRTUAL_PROMPT%'+262        │ │
  │ │               DISABLE_PROMPT = {                                         │ │
  │ │                                │   'activate': "\n# disable nodeenv's    │ │
  │ │                                prompt\n# (prompt already changed by      │ │
  │ │                                original virtualenv's s"+89,              │ │
  │ │                                │   'activate.fish': "\n# disable         │ │
  │ │                                nodeenv's prompt\n# (prompt already       │ │
  │ │                                changed by original virtualenv's s"+93    │ │
  │ │                                }                                         │ │
  │ │            download_node_src = <function download_node_src at            │ │
  │ │                                0x103bdcb80>                              │ │
  │ │                ENABLE_PROMPT = {                                         │ │
  │ │                                │   'activate': '\nunset                  │ │
  │ │                                NODE_VIRTUAL_ENV_DISABLE_PROMPT\n',       │ │
  │ │                                │   'activate.fish': '\nset -e            │ │
  │ │                                NODE_VIRTUAL_ENV_DISABLE_PROMPT\n'        │ │
  │ │                                }                                         │ │
  │ │                  get_env_dir = <function get_env_dir at 0x103bea5e0>     │ │
  │ │    get_last_lts_node_version = <function get_last_lts_node_version at    │ │
  │ │                                0x103bea550>                              │ │
  │ │ get_last_stable_node_version = <function get_last_stable_node_version at │ │
  │ │                                0x103bea4c0>                              │ │
  │ │             get_node_bin_url = <function get_node_bin_url at             │ │
  │ │                                0x103bdc940>                              │ │
  │ │             get_node_src_url = <function get_node_src_url at             │ │
  │ │                                0x103bdc9d0>                              │ │
  │ │            get_node_versions = <function get_node_versions at            │ │
  │ │                                0x103bea3a0>                              │ │
  │ │                 get_root_url = <function get_root_url at 0x103bdc820>    │ │
  │ │                         glob = <module 'glob' from                       │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                         http = <module 'http' from                       │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │             ignore_ssl_certs = False                                     │ │
  │ │               IncompleteRead = <class 'http.client.IncompleteRead'>      │ │
  │ │             install_activate = <function install_activate at             │ │
  │ │                                0x103bea160>                              │ │
  │ │                 install_node = <function install_node at 0x103bdce50>    │ │
  │ │         install_node_wrapped = <function install_node_wrapped at         │ │
  │ │                                0x103bdcee0>                              │ │
  │ │                  install_npm = <function install_npm at 0x103bdcf70>     │ │
  │ │              install_npm_win = <function install_npm_win at 0x103bea040> │ │
  │ │             install_packages = <function install_packages at             │ │
  │ │                                0x103bea0d0>                              │ │
  │ │                           io = <module 'io' from                         │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                    is_CYGWIN = False                                     │ │
  │ │                       is_PY3 = True                                      │ │
  │ │                       is_WIN = False                                     │ │
  │ │               is_x86_64_musl = <function is_x86_64_musl at 0x103bdc8b0>  │ │
  │ │                    iteritems = operator.methodcaller('items')            │ │
  │ │                         join = <function join at 0x102a07ca0>            │ │
  │ │                         json = <module 'json' from                       │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                       logger = <Logger nodeenv (INFO)>                   │ │
  │ │                      logging = <module 'logging' from                    │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                         main = <function main at 0x103bea670>            │ │
  │ │              make_executable = <function make_executable at 0x103bdc670> │ │
  │ │                        mkdir = <function mkdir at 0x10314ef70>           │ │
  │ │        node_version_from_opt = <function node_version_from_opt at        │ │
  │ │                                0x103bdc4c0>                              │ │
  │ │              nodeenv_version = '1.6.0'                                   │ │
  │ │                     operator = <module 'operator' from                   │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                     optparse = <module 'optparse' from                   │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                           os = <module 'os' from                         │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                   parse_args = <function parse_args at 0x1031f0040>      │ │
  │ │                parse_version = <function parse_version at 0x103984670>   │ │
  │ │                        pipes = <module 'pipes' from                      │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                     platform = <module 'platform' from                   │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │             PREDEACTIVATE_SH = '\nif type -p deactivate_node >           │ │
  │ │                                /dev/null; then deactivate_node;fi\n'     │ │
  │ │          print_node_versions = <function print_node_versions at          │ │
  │ │                                0x103bea430>                              │ │
  │ │                           re = <module 're' from                         │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │     remove_env_bin_from_path = <function remove_env_bin_from_path at     │ │
  │ │                                0x103bdc430>                              │ │
  │ │       set_predeactivate_hook = <function set_predeactivate_hook at       │ │
  │ │                                0x103bea1f0>                              │ │
  │ │                         SHIM = "#!/usr/bin/env bash\nexport              │ │
  │ │                                NODE_PATH='__NODE_VIRTUAL_ENV__/lib/node… │ │
  │ │                       shutil = <module 'shutil' from                     │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                 src_base_url = 'https://nodejs.org/download/release'     │ │
  │ │                          ssl = <module 'ssl' from                        │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                         stat = <module 'stat' from                       │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                   subprocess = <module 'subprocess' from                 │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                          sys = <module 'sys' (built-in)>                 │ │
  │ │                    sysconfig = <module 'sysconfig' from                  │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                      tarfile = <module 'tarfile' from                    │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                 tarfile_open = <function tarfile_open at 0x103bdcaf0>    │ │
  │ │                      to_utf8 = <function to_utf8 at 0x103859940>         │ │
  │ │                      urllib2 = <module 'urllib.request' from             │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ │                      urlopen = <function urlopen at 0x103bdcc10>         │ │
  │ │                    writefile = <function writefile at 0x103bdc700>       │ │
  │ │                      zipfile = <module 'zipfile' from                    │ │
  │ │                                '/Library/Developer/CommandLineTools/Lib… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:1079 in main              │
  │                                                                              │
  │   1076 │   │   install_packages(env_dir, opt)                                │
  │   1077 │   else:                                                             │
  │   1078 │   │   env_dir = get_env_dir(opt, args)                              │
  │ ❱ 1079 │   │   create_environment(env_dir, opt)                              │
  │   1080                                                                       │
  │   1081                                                                       │
  │   1082 # ---------------------------------------------------------           │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │       args = [                                                           │ │
  │ │              │                                                           │ │
  │ │              '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/… │ │
  │ │              ]                                                           │ │
  │ │    env_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/… │ │
  │ │        opt = <Values at 0x103bdedf0: {'node': '14.18.1', 'mirror': None, │ │
  │ │              'jobs': '2', 'load_average': None, 'without_ssl': False,    │ │
  │ │              'debug': False, 'profile': False, 'make_path': 'make',      │ │
  │ │              'prebuilt': True, 'verbose': True, 'quiet': False,          │ │
  │ │              'config_file': ['./tox.ini', './setup.cfg',                 │ │
  │ │              '~/.nodeenvrc'], 'requirements': '', 'prompt': None,        │ │
  │ │              'list': False, 'update': False, 'with_npm': False, 'npm':   │ │
  │ │              'latest', 'no_npm_clean': False, 'python_virtualenv':       │ │
  │ │              False, 'clean_src': True, 'force': False,                   │ │
  │ │              'ignore_ssl_certs': False}>                                 │ │
  │ │ src_domain = 'nodejs.org'                                                │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:956 in create_environment │
  │                                                                              │
  │    953 │   mkdir(src_dir)                                                    │
  │    954 │                                                                     │
  │    955 │   if opt.node != "system":                                          │
  │ ❱  956 │   │   install_node(env_dir, src_dir, opt)                           │
  │    957 │   else:                                                             │
  │    958 │   │   mkdir(join(env_dir, 'bin'))                                   │
  │    959 │   │   mkdir(join(env_dir, 'lib'))                                   │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │ env_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip… │ │
  │ │     opt = <Values at 0x103bdedf0: {'node': '14.18.1', 'mirror': None,    │ │
  │ │           'jobs': '2', 'load_average': None, 'without_ssl': False,       │ │
  │ │           'debug': False, 'profile': False, 'make_path': 'make',         │ │
  │ │           'prebuilt': True, 'verbose': True, 'quiet': False,             │ │
  │ │           'config_file': ['./tox.ini', './setup.cfg', '~/.nodeenvrc'],   │ │
  │ │           'requirements': '', 'prompt': None, 'list': False, 'update':   │ │
  │ │           False, 'with_npm': False, 'npm': 'latest', 'no_npm_clean':     │ │
  │ │           False, 'python_virtualenv': False, 'clean_src': True, 'force': │ │
  │ │           False, 'ignore_ssl_certs': False}>                             │ │
  │ │ src_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:721 in install_node       │
  │                                                                              │
  │    718 │   and install it in virtual environment.                            │
  │    719 │   """                                                               │
  │    720 │   try:                                                              │
  │ ❱  721 │   │   install_node_wrapped(env_dir, src_dir, opt)                   │
  │    722 │   except BaseException:                                             │
  │    723 │   │   # this restores the newline suppressed by continued=True      │
  │    724 │   │   logger.info('')                                               │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │ env_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip… │ │
  │ │     opt = <Values at 0x103bdedf0: {'node': '14.18.1', 'mirror': None,    │ │
  │ │           'jobs': '2', 'load_average': None, 'without_ssl': False,       │ │
  │ │           'debug': False, 'profile': False, 'make_path': 'make',         │ │
  │ │           'prebuilt': True, 'verbose': True, 'quiet': False,             │ │
  │ │           'config_file': ['./tox.ini', './setup.cfg', '~/.nodeenvrc'],   │ │
  │ │           'requirements': '', 'prompt': None, 'list': False, 'update':   │ │
  │ │           False, 'with_npm': False, 'npm': 'latest', 'no_npm_clean':     │ │
  │ │           False, 'python_virtualenv': False, 'clean_src': True, 'force': │ │
  │ │           False, 'ignore_ssl_certs': False}>                             │ │
  │ │ src_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:743 in                    │
  │ install_node_wrapped                                                         │
  │                                                                              │
  │    740 │                                                                     │
  │    741 │   # get src if not downloaded yet                                   │
  │    742 │   if not os.path.exists(node_src_dir):                              │
  │ ❱  743 │   │   download_node_src(node_url, src_dir, opt)                     │
  │    744 │                                                                     │
  │    745 │   logger.info('.', extra=dict(continued=True))                      │
  │    746                                                                       │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │      env_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/… │ │
  │ │ node_src_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/… │ │
  │ │     node_url = 'https://nodejs.org/download/release/v14.18.1/node-v14.1… │ │
  │ │          opt = <Values at 0x103bdedf0: {'node': '14.18.1', 'mirror':     │ │
  │ │                None, 'jobs': '2', 'load_average': None, 'without_ssl':   │ │
  │ │                False, 'debug': False, 'profile': False, 'make_path':     │ │
  │ │                'make', 'prebuilt': True, 'verbose': True, 'quiet':       │ │
  │ │                False, 'config_file': ['./tox.ini', './setup.cfg',        │ │
  │ │                '~/.nodeenvrc'], 'requirements': '', 'prompt': None,      │ │
  │ │                'list': False, 'update': False, 'with_npm': False, 'npm': │ │
  │ │                'latest', 'no_npm_clean': False, 'python_virtualenv':     │ │
  │ │                False, 'clean_src': True, 'force': False,                 │ │
  │ │                'ignore_ssl_certs': False}>                               │ │
  │ │      src_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/… │ │
  │ │     src_type = 'prebuilt'                                                │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:570 in download_node_src  │
  │                                                                              │
  │    567 │   """                                                               │
  │    568 │   logger.info('.', extra=dict(continued=True))                      │
  │    569 │   try:                                                              │
  │ ❱  570 │   │   dl_contents = io.BytesIO(urlopen(node_url).read())            │
  │    571 │   except IncompleteRead as e:                                       │
  │    572 │   │   logger.warning('Incomplete read while reading'                │
  │    573 │   │   │   │   │      'from {}'.format(node_url))                    │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │ node_url = 'https://nodejs.org/download/release/v14.18.1/node-v14.18.1-… │ │
  │ │      opt = <Values at 0x103bdedf0: {'node': '14.18.1', 'mirror': None,   │ │
  │ │            'jobs': '2', 'load_average': None, 'without_ssl': False,      │ │
  │ │            'debug': False, 'profile': False, 'make_path': 'make',        │ │
  │ │            'prebuilt': True, 'verbose': True, 'quiet': False,            │ │
  │ │            'config_file': ['./tox.ini', './setup.cfg', '~/.nodeenvrc'],  │ │
  │ │            'requirements': '', 'prompt': None, 'list': False, 'update':  │ │
  │ │            False, 'with_npm': False, 'npm': 'latest', 'no_npm_clean':    │ │
  │ │            False, 'python_virtualenv': False, 'clean_src': True,         │ │
  │ │            'force': False, 'ignore_ssl_certs': False}>                   │ │
  │ │  src_dir = '/private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pi… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /private/var/folders/52/jqtk04q94kqcptn0_zf0k2dw0000gn/T/pip-build-env-7wdma │
  │ the/overlay/lib/python3.8/site-packages/nodeenv.py:606 in urlopen            │
  │                                                                              │
  │    603 │   │   context = ssl.SSLContext()                                    │
  │    604 │   │   context.verify_mode = ssl.CERT_NONE                           │
  │    605 │   │   return urllib2.urlopen(req, context=context)                  │
  │ ❱  606 │   return urllib2.urlopen(req)                                       │
  │    607                                                                       │
  │    608 # ---------------------------------------------------------           │
  │    609 # Virtual environment functions                                       │
  │                                                                              │
  │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
  │ │  headers = {                                                             │ │
  │ │            │   'User-Agent': 'nodeenv/1.6.0                              │ │
  │ │            (https://github.com/ekalinin/nodeenv/)'                       │ │
  │ │            }                                                             │ │
  │ │ home_url = 'https://github.com/ekalinin/nodeenv/'                        │ │
  │ │      req = <urllib.request.Request object at 0x103bdeeb0>                │ │
  │ │      url = 'https://nodejs.org/download/release/v14.18.1/node-v14.18.1-… │ │
  │ ╰──────────────────────────────────────────────────────────────────────────╯ │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:222 in urlopen                     │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:531 in open                        │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:640 in http_response               │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:569 in error                       │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:502 in _call_chain                 │
  │                                                                              │
  │ /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Ver │
  │ sions/3.8/lib/python3.8/urllib/request.py:649 in http_error_default          │
  ╰──────────────────────────────────────────────────────────────────────────────╯
  HTTPError: HTTP Error 404: Not Found
  error: nodeenv-creation-failed
  
  × Failed to create a `nodeenv`
  ╰─> See above for failure output from the underlying tooling.
  
  hint: A `urllib.error.HTTPError` would indicate mean that the issue is related
        to the network, or the NodeJS servers, or the node version that this tool
        is trying to fetch is no longer available.
  
  Link: https://sphinx-theme-builder.rtfd.io/errors/#nodeenv-creation-failed
  ----------------------------------------
  ERROR: Failed building wheel for pydata-sphinx-theme
Failed to build pydata-sphinx-theme

@damianavila
Copy link
Collaborator

@pradyunsg do you have some thoughts?

Btw, what are you using in stb to provide those logs? Or those are coming from something else?

@pradyunsg
Copy link
Contributor

Oh hey, an error message that I can improve!

The issue here is that there's no officially supported NodeJS 14 release for M1 Macs that runs natively (i.e. aarch64 instead of x86_64 via Rosetta). M1 support was added in NodeJS 16.

nodeenv uses the system architecture to find a compatible official NodeJS release binary, which could not be found for MacOS + M1 aarch64 + NodeJS 14.


If someone could file an issue or PR to update the error message in sphinx-theme-builder to include information about "hey, a urlerror might be a binary compatibility issue", that would be great!

Btw, what are you using in stb to provide those logs? Or those are coming from something else?

Rich. :)

https://github.com/pradyunsg/sphinx-theme-builder/blob/97bd61c3a441341cd33c5af11c3264226c297b9e/src/sphinx_theme_builder/_internal/nodejs.py#L72

@choldgraf
Copy link
Collaborator

See pradyunsg/sphinx-theme-builder#12 @pradyunsg

What do you recommend somebody do in this case? Download their own global node environment? Specify node=v16 somehow?

@pradyunsg
Copy link
Contributor

pradyunsg commented Jan 12, 2022

14.18.1

Install this version of node somewhere (likely globally), set it up to run via Rosetta, run in an environment where node runs that version and then export STB_USE_SYSTEM_NODE=true before running pip install!

Alternatively, we can update pydata-sphinx-theme to a newer version of NodeJS (16 is the current LTS anyway). :)

@choldgraf
Copy link
Collaborator

In that case, I propose that we bump the version of node that this theme uses to 16, I opened an issue to discuss and track: #551

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

Successfully merging a pull request may close this issue.

5 participants