jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.73k stars 566 forks source link

ERROR: Could not install packages due to an EnvironmentError #1476

Open ahbon123 opened 3 years ago

ahbon123 commented 3 years ago

When I install nbconvert under Mac OS with pip3 install nbconvert, it raises an error:

x@localhost % pip3  install nbconvert         
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: nbconvert in /Users/x/anaconda3/lib/python3.6/site-packages (5.3.1)
Requirement already satisfied: mistune>=0.7.4 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (0.8.3)
Requirement already satisfied: jupyter-core in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.4.0)
Requirement already satisfied: nbformat>=4.4 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.4.0)
Requirement already satisfied: entrypoints>=0.2.2 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (0.2.3)
Requirement already satisfied: bleach in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (1.5.0)
Requirement already satisfied: jinja2 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (2.10)
Requirement already satisfied: testpath in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (0.3.1)
Requirement already satisfied: pygments in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (2.2.0)
Requirement already satisfied: pandocfilters>=1.4.1 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (1.4.2)
Requirement already satisfied: traitlets>=4.2 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.3.2)
Requirement already satisfied: six in /Users/x/anaconda3/lib/python3.6/site-packages (from bleach->nbconvert) (1.10.0)
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999
  Using cached html5lib-0.9999999-py3-none-any.whl
Requirement already satisfied: six in /Users/x/anaconda3/lib/python3.6/site-packages (from bleach->nbconvert) (1.10.0)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/x/anaconda3/lib/python3.6/site-packages (from jinja2->nbconvert) (1.0)
Requirement already satisfied: traitlets>=4.2 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.3.2)
Requirement already satisfied: ipython_genutils in /Users/x/anaconda3/lib/python3.6/site-packages (from nbformat>=4.4->nbconvert) (0.2.0)
Requirement already satisfied: traitlets>=4.2 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.3.2)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /Users/x/anaconda3/lib/python3.6/site-packages (from nbformat>=4.4->nbconvert) (2.6.0)
Requirement already satisfied: jupyter-core in /Users/x/anaconda3/lib/python3.6/site-packages (from nbconvert) (4.4.0)
Requirement already satisfied: ipython_genutils in /Users/x/anaconda3/lib/python3.6/site-packages (from nbformat>=4.4->nbconvert) (0.2.0)
Requirement already satisfied: six in /Users/x/anaconda3/lib/python3.6/site-packages (from bleach->nbconvert) (1.10.0)
Requirement already satisfied: decorator in /Users/x/anaconda3/lib/python3.6/site-packages (from traitlets>=4.2->nbconvert) (4.3.0)
Installing collected packages: html5lib
  Attempting uninstall: html5lib
    Found existing installation: html5lib 1.0.1
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/Users/x/anaconda3/lib/python3.6/site-packages/html5lib-1.0.1.dist-info/RECORD'

Anyone could help to deal with this issue? Thanks.

t-makaro commented 3 years ago

Looks like pip is trying to update a package by first uninstalling a package that was installed with conda. If you are in a conda environment, then use conda install nbconvert. Otherwise pip can break things which may require reinstalling conda in the worst case scenario.