Jupiter notebook shows application launch error

Viewed 179

Jupiter notebook works fine in base(root) environment but when i try to launch it from a new environment it shows:

Unable to create process using 'C:\Users\MOHAMMED SALMAN\.conda\envs\env2\python.exe "C:\Users\MOHAMMED SALMAN\.conda\envs\env2\Scripts\jupyter-notebook-script.py"'

But then if i start it from windows toolbar,it starts up and it shows:

mod = importlib.import_module(modulename)
      File "C:\Users\MOHAMMED SALMAN\.conda\envs\env2\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'jupyter_http_over_ws'
[W 2022-08-09 14:14:37.933 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-08-09 14:14:37.934 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2022-08-09 14:14:37.948 LabApp] JupyterLab extension loaded from C:\Users\MOHAMMED SALMAN\.conda\envs\env2\lib\site-packages\jupyterlab
[I 2022-08-09 14:14:37.948 LabApp] JupyterLab application directory is C:\Users\MOHAMMED SALMAN\.conda\envs\env2\share\jupyter\lab
[I 14:14:37.957 NotebookApp] The port 8888 is already in use, trying another port.
[I 14:14:37.959 NotebookApp] Serving notebooks from local directory: C:\Users\MOHAMMED SALMAN
[I 14:14:37.959 NotebookApp] Jupyter Notebook 6.4.12 is running at:
[I 14:14:37.959 NotebookApp] http://localhost:8889/?token=c07c65a6f1bc87212098ea8eec7e99f8f2abfeea522cea6b
[I 14:14:37.959 NotebookApp]  or http://127.0.0.1:8889/?token=c07c65a6f1bc87212098ea8eec7e99f8f2abfeea522cea6b
[I 14:14:37.960 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:14:38.050 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/MOHAMMED%20SALMAN/AppData/Roaming/jupyter/runtime/nbserver-2268-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=c07c65a6f1bc87212098ea8eec7e99f8f2abfeea522cea6b
     or http://127.0.0.1:8889/?token=c07c65a6f1bc87212098ea8eec7e99f8f2abfeea522cea6b

I want to access jupyter notebook from the terminal in new environment to make-sure the notebook server on my machine run on port 8888

So , Anyone has an idea to why am i facing such an error ?

error notification in anaconda gui from in new environment

error notification in anoconda terminal new environment

The same environment when opened from windows toolbar

1 Answers

Guess it's buggy jupyter server. You need to reinstall jupyter-lab/notebook in that particular conda environment.

Open a terminal. I see you are using Windows OS, so you need to open the Anaconda prompt. The following command will give you a list of all conda envs.

conda env list

Then activate your env.

conda activate env2

Now reinstall jupyter-lab

conda install -c conda-forge jupyterlab

For jupyter notebook

conda install -c conda-forge notebook
Related