Skip to content

README install for latest shiny from github #1720

@chendaniely

Description

@chendaniely

Running the current example in the README to install shiny from github returns an error (using pip 24.2)

$ pip install https://github.com/posit-dev/py-shiny/tarball/main

Collecting https://github.com/posit-dev/py-shiny/tarball/main
  Using cached https://github.com/posit-dev/py-shiny/tarball/main
  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
  ╰─> [40 lines of output]
      Traceback (most recent call last):
        File "/Users/danielchen/.pyenv/versions/3.12.6/envs/adaptive/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/danielchen/.pyenv/versions/3.12.6/envs/adaptive/lib/python3.12/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/danielchen/.pyenv/versions/3.12.6/envs/adaptive/lib/python3.12/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/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 1, in <module>
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 145, in setup
          _setup_distribution = dist = klass(attrs)
                                       ^^^^^^^^^^^^
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 283, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 279, in __init__
          self.finalize_options()
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 635, in finalize_options
          ep(self)
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 123, in infer_version
          _assign_version(dist, config)
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py", line 58, in _assign_version
          _version_missing(config)
        File "/private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-build-env-zbrbnvco/overlay/lib/python3.12/site-packages/setuptools_scm/_get_version_impl.py", line 117, in _version_missing
          raise LookupError(
      LookupError: setuptools-scm was unable to detect version for /private/var/folders/2b/qckmp39n7qn1dh0tpcm8g89w0000gn/T/pip-req-build-sj588mhi.
      
      Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
      
      For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
      [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.
14:46:41 (adaptive) (3.12.6) (main) ~/git/rstudio/test_shiny_apps

The error message mentions:

      For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

running pip install git+https://github.com/posit-dev/py-shiny.git seem to work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions