damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.68k stars 416 forks source link

Conda installation fails #633

Open l-oksanen opened 1 year ago

l-oksanen commented 1 year ago

Running

conda create -n test
conda activate test
conda config --env --add channels conda-forge
conda install rise

gives

ERROR conda.core.link:_execute(740): An error occurred while installing package 'conda-forge::rise-5.7.1-py311h38be061_2'.
Rolling back transaction: done

LinkError: post-link script failed for package conda-forge::rise-5.7.1-py311h38be061_2
location of failed script: /home/lsoksane/Local/conda/envs/test/bin/.rise-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout: 
stderr: Traceback (most recent call last):
  File "/home/lsoksane/Local/conda/envs/test/bin/jupyter-nbextension", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/jupyter_core/application.py", line 277, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/traitlets/config/application.py", line 1041, in launch_instance
    app.start()
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 972, in start
    super().start()
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/jupyter_core/application.py", line 266, in start
    self.subapp.start()
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 882, in start
    self.toggle_nbextension_python(self.extra_args[0])
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 855, in toggle_nbextension_python
    return toggle(module,
           ^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 470, in enable_nbextension_python
    return _set_nbextension_state_python(True, module, user, sys_prefix,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 368, in _set_nbextension_state_python
    m, nbexts = _get_nbextension_metadata(module)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/notebook/nbextensions.py", line 1107, in _get_nbextension_metadata
    m = import_item(module)
        ^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/traitlets/utils/importstring.py", line 38, in import_item
    return __import__(parts[0])
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/rise/__init__.py", line 3, in <module>
    __version__ = pkg_resources.require("rise")[0].version
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/pkg_resources/__init__.py", line 956, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/pkg_resources/__init__.py", line 815, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/lsoksane/Local/conda/envs/test/lib/python3.11/site-packages/pkg_resources/__init__.py", line 856, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'webcolors>=1.11; extra == "format-nongpl"' distribution was not found and is required by jsonschema

return code: 1

()

I was able to install a working copy by running

conda install webcolors
conda install uri-template
conda install jsonpointer
conda install isoduration
conda install fqdn
conda install rise
glciampaglia commented 1 year ago

Same issue here. I have tried what the original poster did and got a working copy running as well, but I am not sure why that works. Perhaps one of those packages (webcolors, etc.) was not specified as a dependency?

schmittwilken commented 1 year ago

same issue here. The mentioned solutions works for me

emiliom commented 1 year ago

Same here. The fix worked for me, too. Thanks!

nandocova commented 1 year ago

Had the same issue. Your solution worked

I think it's strange the dependencies aren't being installed automatically and this issue has gone unnoticed for so long...

tl-hbk commented 1 year ago

I believe that this is caused by the dependencies in the conda package for jupyter_events being incorrect.

https://github.com/conda-forge/jupyter_events-feedstock/issues/11

If you install jsonschema-with-format-nongpl at the same time as rise you should get webcolors installed