# Help installing/running JupyterLab in a conda environment

**URL:** <https://discourse.jupyter.org/t/help-installing-running-jupyterlab-in-a-conda-environment/8227>\
**Category:** JupyterLab\
**Created:** [March 6, 2021, 3:28pm UTC](https://discourse.jupyter.org/t/help-installing-running-jupyterlab-in-a-conda-environment/8227 "2021-03-06T15:28:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![villares](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/villares/32/3900_2.png) [@villares](https://discourse.jupyter.org/u/villares)\
**Post date:** [March 6, 2021, 3:28pm UTC](https://discourse.jupyter.org/t/help-installing-running-jupyterlab-in-a-conda-environment/8227/1 "2021-03-06T15:28:14Z")

</div>

Hi, I’m very unskilled with virtual environments, and I have been trying to use conda, from a mini-conda installation, for that. I know I might break things up because sometimes I need to pip install things on this environment and I know this can break the conda tracking of libraries, this could be one these instances.

I have tried uninstalling and re-installing with `conda install jupyter` and `conda install jupyterlab`. I get this error when trying to launch `jupyter lab`:

```auto
(blimp) [villares@L340 ~]$ jupyter lab
Traceback (most recent call last):
  File "/home/villares/miniconda3/envs/blimp/bin/jupyter-lab", line 6, in <module>
    from jupyterlab.labapp import main
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/jupyterlab/labapp.py", line 14, in <module>
    from jupyterlab_server import slugify, WORKSPACE_EXTENSION
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/jupyterlab_server/ __init__.py", line 4, in <module>
    from .app import LabServerApp
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/jupyterlab_server/app.py", line 9, in <module>
    from .server import ServerApp
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/jupyterlab_server/server.py", line 20, in <module>
    from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/notebook/notebookapp.py", line 83, in <module>
    from .services.contents.manager import ContentsManager
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/notebook/services/contents/manager.py", line 17, in <module>
    from nbformat import sign, validate as validate_nb, ValidationError
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/nbformat/ __init__.py", line 32, in <module>
    from .validator import validate, ValidationError
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/nbformat/validator.py", line 12, in <module>
    from .json_compat import get_current_validator, ValidationError
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/nbformat/json_compat.py", line 10, in <module>
    import jsonschema
  File "/home/villares/miniconda3/envs/blimp/lib/python3.7/site-packages/jsonschema/ __init__.py", line 34, in <module>
    __version__ = metadata.version("jsonschema")
AttributeError: module 'importlib_metadata' has no attribute 'version'

```

Please advise…

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [March 6, 2021, 6:32pm UTC](https://discourse.jupyter.org/t/help-installing-running-jupyterlab-in-a-conda-environment/8227/2 "2021-03-06T18:32:09Z")

</div>

If you think you’ve messed up your environment by pip installing something the easiest solution is probably to create a new conda environment, install JupyterLab and any other packages using conda, check everything works, and finally pip install the packages that aren’t available through conda.

---

<div class="post-metadata">

**Author:** ![villares](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/villares/32/3900_2.png) [@villares](https://discourse.jupyter.org/u/villares)\
**Post date:** [March 6, 2021, 7:36pm UTC](https://discourse.jupyter.org/t/help-installing-running-jupyterlab-in-a-conda-environment/8227/3 "2021-03-06T19:36:41Z")

</div>

Thanks, @manics!

I’m not sure _how_ I broke my main env, but creating a fresh one got me running `jupyter lab` without doing anything else! Now I just have to watch out and see if I can avoid (or at least understand) the things that broke it.
