jupyter / jupyter_core

Core Jupyter functionality
https://jupyter-core.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
194 stars 180 forks source link

FAILED tests/test_troubleshoot.py::test_troubleshoot #363

Open tornaria opened 9 months ago

tornaria commented 9 months ago

This test presumes pip is installed. If not:

FAILED tests/test_troubleshoot.py::test_troubleshoot - AssertionError: assert 'pip list' in '$PATH:\n\t/builddir/python3-jupyter_c...

Here's the full output of jupyter_core.troubleshoot.main():

$ python -c 'from jupyter_core.troubleshoot import main ; main()'
/usr/bin/python: No module named pip
$PATH:
    /usr/local/sbin
    /usr/local/bin
    /usr/bin
    /usr/sbin
    /sbin
    /bin

sys.path:

    /usr/lib/python311.zip
    /usr/lib/python3.11
    /usr/lib/python3.11/lib-dynload
    /usr/lib/python3.11/site-packages

sys.executable:
    /usr/bin/python

sys.version:
    3.11.5 (main, Aug 27 2023, 03:49:50) [GCC 12.2.0]

platform.platform():
    Linux-6.4.15_1-x86_64-with-glibc2.36

which -a jupyter:
    /usr/bin/jupyter
    /usr/sbin/jupyter
    /sbin/jupyter
    /bin/jupyter

BTW, which is not in posix. The posix way is to use command -v jupyter.

matoro commented 8 months ago

I also ran into this, seems having pip installed is a mandatory test dependency.