knitty icon indicating copy to clipboard operation
knitty copied to clipboard

Fails to install using `pip` (contra the README)

Open phlummox opened this issue 3 years ago • 0 comments

Currently, knitty fails to install under Python 3.6 and Python 3.8, due to this bug: https://github.com/kiwi0fruit/py-pandoc/issues/6.

Installation fails for both those versions of Python, using the current version of pip (22.0.4).

It does seem to work with some older versions of pip (e.g. pip 20.0.2 + wheel-0.37.1); but the failure to work with pip 22.0.4 is inconsistent with the README/documentation. If the README claims that py-pandoc can be installed with pip, that should mean "can be installed using pip's most current version".

Version information

  • Python 3.8.10
  • Ubuntu 20.04
  • pip 22.0.4
  • wheel 0.37.1

Steps to reproduce

$ pip install knitty

Expected result

Knitty should be installed

Actual result

Click to show details
$ pip install knitty
Collecting knitty
  Using cached knitty-0.6.1-py3-none-any.whl
Collecting pandocfilters
  Using cached pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting jupyter-client
  Using cached jupyter_client-7.1.2-py3-none-any.whl (130 kB)
Collecting click
  Using cached click-8.0.4-py3-none-any.whl (97 kB)
Collecting py-pandoc>=2.6
  Using cached py-pandoc-2.9.2.1.2.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Collecting ipython
  Using cached ipython-8.1.1-py3-none-any.whl (750 kB)
Collecting shutilwhich-cwdpatch>=0.1.0
  Using cached shutilwhich_cwdpatch-0.1.0-py3-none-any.whl
Collecting psutil
  Using cached psutil-5.9.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB)
Collecting ipykernel
  Using cached ipykernel-6.9.2-py3-none-any.whl (130 kB)
Collecting jupyter-core
  Using cached jupyter_core-4.9.2-py3-none-any.whl (86 kB)
Collecting nbconvert>=5.4.1
  Using cached nbconvert-6.4.4-py3-none-any.whl (561 kB)
Collecting pyyaml
  Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
Collecting traitlets
  Using cached traitlets-5.1.1-py3-none-any.whl (102 kB)
Collecting panflute>=1.11.2
  Using cached panflute-2.1.3-py3-none-any.whl (35 kB)
Collecting nbformat>=4.4
  Using cached nbformat-5.2.0-py3-none-any.whl (74 kB)
Collecting entrypoints>=0.2.2
  Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting pygments>=2.4.1
  Using cached Pygments-2.11.2-py3-none-any.whl (1.1 MB)
Collecting testpath
  Using cached testpath-0.6.0-py3-none-any.whl (83 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting mistune<2,>=0.8.1
  Using cached mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting bleach
  Using cached bleach-4.1.0-py2.py3-none-any.whl (157 kB)
Collecting nbclient<0.6.0,>=0.5.0
  Using cached nbclient-0.5.13-py3-none-any.whl (70 kB)
Collecting jupyterlab-pygments
  Using cached jupyterlab_pygments-0.1.2-py2.py3-none-any.whl (4.6 kB)
Collecting jinja2>=2.4
  Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting defusedxml
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting nest-asyncio
  Using cached nest_asyncio-1.5.4-py3-none-any.whl (5.1 kB)
Collecting debugpy<2.0,>=1.0.0
  Using cached debugpy-1.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.9 MB)
Collecting matplotlib-inline<0.2.0,>=0.1.0
  Using cached matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting tornado<7.0,>=4.2
  Using cached tornado-6.1-cp38-cp38-manylinux2010_x86_64.whl (427 kB)
Requirement already satisfied: setuptools>=18.5 in ./env/lib/python3.8/site-packages (from ipython->knitty) (44.0.0)
Collecting jedi>=0.16
  Using cached jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Using cached prompt_toolkit-3.0.28-py3-none-any.whl (380 kB)
Collecting pexpect>4.3
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting backcall
  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting stack-data
  Using cached stack_data-0.2.0-py3-none-any.whl (21 kB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting pyzmq>=13
  Using cached pyzmq-22.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Collecting python-dateutil>=2.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting jsonschema!=2.5.0,>=2.4
  Using cached jsonschema-4.4.0-py3-none-any.whl (72 kB)
Collecting ptyprocess>=0.5
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting webencodings
  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting executing
  Using cached executing-0.8.3-py2.py3-none-any.whl (16 kB)
Collecting pure-eval
  Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens
  Using cached asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Using cached pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)
Collecting attrs>=17.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting importlib-resources>=1.4.0
  Using cached importlib_resources-5.4.0-py3-none-any.whl (28 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting zipp>=3.1.0
  Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB)
Building wheels for collected packages: py-pandoc
  Building wheel for py-pandoc (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      running bdist_wheel
      running build
      installing to build/bdist.linux-x86_64/wheel
      running install
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 152, in <module>
          setup(
        File "/home/user/proj/env/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/home/user/proj/env/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 335, in run
          self.run_command('install')
        File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 58, in run
          excract_tar_and_move_files(url=URL, **spec)
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 141, in excract_tar_and_move_files
          raise e
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 119, in excract_tar_and_move_files
          raise AssertionError('pip download error:\n\n{}\n\nOr pip download behaviour changed. Downgrade pip or wait for bugfix in this case.'.format(stderr))
      AssertionError: pip download error:
      
      ERROR: https://anaconda.org/conda-forge/pandoc/2.9.2.1/download/linux-64/pandoc-2.9.2.1-0.tar.bz2 (from -r /tmp/tmp3cult676/requirements.txt (line 1)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
      
      
      Or pip download behaviour changed. Downgrade pip or wait for bugfix in this case.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for py-pandoc
  Running setup.py clean for py-pandoc
Failed to build py-pandoc
Installing collected packages: webencodings, wcwidth, shutilwhich-cwdpatch, pure-eval, ptyprocess, pickleshare, mistune, executing, backcall, zipp, traitlets, tornado, testpath, soupsieve, six, pyzmq, pyyaml, pyrsistent, pyparsing, pygments, py-pandoc, psutil, prompt-toolkit, pexpect, parso, pandocfilters, nest-asyncio, MarkupSafe, entrypoints, defusedxml, decorator, debugpy, click, attrs, python-dateutil, panflute, packaging, matplotlib-inline, jupyterlab-pygments, jupyter-core, jinja2, jedi, importlib-resources, beautifulsoup4, asttokens, stack-data, jupyter-client, jsonschema, bleach, nbformat, ipython, nbclient, ipykernel, nbconvert, knitty
  Running setup.py install for py-pandoc ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for py-pandoc did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running install
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 152, in <module>
          setup(
        File "/home/user/proj/env/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 58, in run
          excract_tar_and_move_files(url=URL, **spec)
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 141, in excract_tar_and_move_files
          raise e
        File "/tmp/pip-install-96ufuwfj/py-pandoc_8383d06a86924da9b9d8f84b5405c0e7/setup.py", line 119, in excract_tar_and_move_files
          raise AssertionError('pip download error:\n\n{}\n\nOr pip download behaviour changed. Downgrade pip or wait for bugfix in this case.'.format(stderr))
      AssertionError: pip download error:
      
      ERROR: https://anaconda.org/conda-forge/pandoc/2.9.2.1/download/linux-64/pandoc-2.9.2.1-0.tar.bz2 (from -r /tmp/tmpm4ckcx18/requirements.txt (line 1)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
      
      
      Or pip download behaviour changed. Downgrade pip or wait for bugfix in this case.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> py-pandoc

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

phlummox avatar Mar 22 '22 08:03 phlummox