You are not logged in.

#1 2020-10-06 09:10:56

benedict_0
Member
Registered: 2019-11-08
Posts: 71

[SOLVED] Cannot install jupyterlab or jupyter-notebook

Hi!

I run into a problem while trying to install `jupyter-notebook`:

resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: python-ipykernel will be installed before its python-jupyter_client dependency
warning: dependency cycle detected:
warning: jupyter-widgetsnbextension will be installed before its jupyter-notebook dependency

Packages (27) jupyter-4.6.3-1  jupyter-nbconvert-5.6.1-1  jupyter-nbformat-5.0.6-1
              jupyter-widgetsnbextension-1:3.5.1-1  jupyter_console-6.2.0-1  mathjax2-2.7.9-1
              python-argon2_cffi-20.1.0-1  python-attrs-20.2.0-1  python-bleach-3.1.5-1  python-defusedxml-0.6.0-4
              python-entrypoints-0.3-3  python-ipykernel-5.3.4-1  python-ipywidgets-7.5.1-4  python-jinja-2.11.2-1
              python-jsonschema-3.2.0-2  python-jupyter_client-6.1.6-1  python-jupyter_core-4.6.3-2
              python-mistune-0.8.4-3  python-pandocfilters-1.4.2-4  python-prometheus_client-0.8.0-2
              python-pyrsistent-0.17.3-1  python-pyzmq-19.0.1-2  python-send2trash-1.5.0-4  python-terminado-0.8.3-1
              python-testpath-0.4.4-1  python-tornado-6.0.4-2  jupyter-notebook-6.1.4-1

Total Installed Size:  76,25 MiB

:: Proceed with installation? [Y/n] 
(27/27) checking keys in keyring                                       [########################################] 100%
(27/27) checking package integrity                                     [########################################] 100%
(27/27) loading package files                                          [########################################] 100%
(27/27) checking for file conflicts                                    [########################################] 100%

error: failed to commit transaction (conflicting files)
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__init__.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/__init__.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/_compat.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/_identifier.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/asyncfilters.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/asyncsupport.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/bccache.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/compiler.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/constants.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/debug.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/defaults.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/environment.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/exceptions.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/ext.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/filters.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/idtracking.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/lexer.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/loaders.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/meta.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/nativetypes.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/nodes.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/optimizer.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/parser.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/runtime.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/sandbox.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/tests.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/utils.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/__pycache__/visitor.cpython-38.pyc exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/_compat.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/_identifier.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/asyncfilters.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/asyncsupport.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/bccache.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/compiler.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/constants.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/debug.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/defaults.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/environment.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/exceptions.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/ext.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/filters.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/idtracking.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/lexer.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/loaders.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/meta.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/nativetypes.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/nodes.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/optimizer.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/parser.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/runtime.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/sandbox.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/tests.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/utils.py exists in filesystem
python-jinja: /usr/lib/python3.8/site-packages/jinja2/visitor.py exists in filesystem
Errors occurred, no packages were upgraded.

or `jupyterlab` (similar output).

What can I try?

Last edited by benedict_0 (2020-10-06 12:03:37)

Offline

#2 2020-10-06 09:14:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

That happens because you ran pip with sudo which is something you should never do.  Uninstall the jinja2 package with pip and then retry.

Offline

#3 2020-10-06 09:17:15

benedict_0
Member
Registered: 2019-11-08
Posts: 71

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

No I ran `sudo pacman -Syu jupyter-notebook`.

Offline

#4 2020-10-06 09:22:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

I know, but that error happens because there are files present on a path that pacman intends to use for packages, that aren't from a pacman package. That usually happens because you installed some kind of python software that pulled jinja2 with the equivalent of sudo pip at some point (... in the past, doesn't really matter when, but you will have done that).

The more general handling of this error is described here https://wiki.archlinux.org/index.php/Pa … )%22_error

But while we are at it get your system in a consistent state and uninstall unintentionally installed pip packages properly (... or just rm the jinja2 directory and then wonder why whatever you originally tried to do with pip breaks)

Last edited by V1del (2020-10-06 09:23:45)

Offline

#5 2020-10-06 09:57:28

benedict_0
Member
Registered: 2019-11-08
Posts: 71

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

Thank you V1del, this is crystal clear.

V1del wrote:

you installed some kind of python software that pulled jinja2 with the equivalent of sudo pip at some point (... in the past, doesn't really matter when, but you will have done that).

I try to be very careful with that, but I cannot swear I didn't do that in the past hmm

But while we are at it get your system in a consistent state and uninstall unintentionally installed pip packages properly (... or just rm the jinja2 directory and then wonder why whatever you originally tried to do with pip breaks)

Will do!

Offline

#6 2020-10-07 07:44:21

benedict_0
Member
Registered: 2019-11-08
Posts: 71

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

V1del wrote:

But while we are at it get your system in a consistent state and uninstall unintentionally installed pip packages properly (... or just rm the jinja2 directory and then wonder why whatever you originally tried to do with pip breaks)

V1del, the command pip list -l returns a depressing long list, but those packages were not installed with a sudo, right?

Is there a way to track those badly installed packages?

Best,
benedict

Offline

#7 2020-10-11 13:37:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

No that will list everything regardless. I'd say run a

pacman -Qo /usr/lib/python3.8/site-packages/*

and investigate whatever's not currently part of a package.

Offline

#8 2020-10-11 13:40:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

Note that you really only want the stderr from the above command:

pacman -Qo /usr/lib/python3.8/site-packages/* >/dev/null

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2020-10-12 07:27:33

benedict_0
Member
Registered: 2019-11-08
Posts: 71

Re: [SOLVED] Cannot install jupyterlab or jupyter-notebook

Awesome command! Thanks to both of you smile

Offline

Board footer

Powered by FluxBB