question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notebook cannot load user site packages correctly after updated to 2022.2.101

See original GitHub issue

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

My notebooks cannot load user site packages after the extension updated to 2022.2.101 In notebook, following code print ‘False’.

import site
print(site.ENABLE_USER_SITE)

Reverting the Jupyter extension to 2022.1 can solve this problem I’m using raw Python on remote CentOS 7.9 machine, without any virtual env

VS Code Version

Version: 1.65.0 Commit: b5205cc8eb4fbaa726835538cd82372cc0222d43 Date: 2022-03-02T11:12:36.248Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Linux x64 5.13.0-28-generic snap

Jupyter Extension Version

2022.2.102

Jupyter logs

Visual Studio Code (1.65.0, ssh-remote, desktop)
Jupyter Extension Version: 2022.2.1020642448.
Python Extension Version: 2022.2.1924087327.
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Error 12:10:29: Exception while attempting zmq : Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/node_modules/zeromq/prebuilds/linux-x64/node.napi.glibc.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.n._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:32148)
    at Function.S._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:28737)
    at Function.g._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:99:60372)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at load (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/node_modules/node-gyp-build/index.js:1:543)
    at Object.<anonymous> (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/node_modules/zeromq/lib/native.js:1:136)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.n._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:32148)
    at Function.S._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:28737)
    at Function.g._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:99:60372)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/node_modules/zeromq/lib/index.js:1:82)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.n._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:32148)
    at Function.S._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:104:28737)
    at Function.g._load (/home/xhtang/.vscode-server/bin/b5205cc8eb4fbaa726835538cd82372cc0222d43/out/vs/workbench/api/node/extensionHostProcess.js:99:60372)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.92747 (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:3878485)
    at __webpack_require__ (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:4545798)
    at d.zmqSupported (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:973026)
    at d.isSupportedForLocalLaunch (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:972817)
    at d.get isSupported [as isSupported] (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:972727)
    at t.registerTypes (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:983912)
    at /home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:1070474
    at /home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:4547373
    at e.activate (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:4547050)
Info 12:10:29: Old kernelspecs (created by Jupyter extension) stored in directory /home/xhtang/.local/share/jupyter/kernels/__old_vscode_kernelspecs
Info 12:10:29: Preferred kernel connection found in cache .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:29: PreferredConnection: .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher found for NotebookDocument: untitled:Untitled-1.ipynb?jupyter-notebook
Info 12:10:29: Early registration of controller for Kernel connection .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:29: TargetController found ID: .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher for document untitled:Untitled-1.ipynb?jupyter-notebook
Info 12:10:29: Setting controller affinity for untitled:Untitled-1.ipynb?jupyter-notebook .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:29: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 12:10:29: Creating controller for jupyter-notebook with interpreter /bin/python3.8
Info 12:10:29: Getting activation commands for /bin/python3.8 are not cached. May take a while.
Info 12:10:29: Getting activation commands for /usr/bin/python3.8 are not cached. May take a while.
Info 12:10:29: Interrupt requested & no kernel.
Info 12:10:29: Setting setActiveController for untitled:Untitled-1.ipynb?jupyter-notebook
Info 12:10:29: KernelProvider switched kernel to id = .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:29: Starting Notebook in kernel.ts id = .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:29: Checking for server existence.
Info 12:10:29: Checking for server usability.
Info 12:10:29: Registering dummy command feature
Info 12:10:30: Process Execution: > /bin/python3.8 -m pip list
> /bin/python3.8 -m pip list
Info 12:10:30: Process Execution: > /usr/bin/python3.8 -c "import jupyter"
> /usr/bin/python3.8 -c "import jupyter"
Info 12:10:30: Process Execution: > /usr/bin/python3.8 -c "import notebook"
> /usr/bin/python3.8 -c "import notebook"
Info 12:10:30: Process Execution: > /usr/bin/python3.8 -m jupyter kernelspec --version
> /usr/bin/python3.8 -m jupyter kernelspec --version
Info 12:10:30: Starting notebook server.
Info 12:10:30: Connecting to server
Info 12:10:30: Launching server
Info 12:10:30: Starting Notebook
Info 12:10:31: Generating custom default config at /tmp/b00dafac-6062-4c9c-a0a1-5d0d7ab29989/jupyter_notebook_config.py
Info 12:10:31: Starting Jupyter Notebook
Starting Jupyter from /usr/bin/python3.8 with command line --no-browser --notebook-dir="/home/xhtang/crypto-log" --config=/tmp/b00dafac-6062-4c9c-a0a1-5d0d7ab29989/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 12:10:31: Creating daemon pool for /usr/bin/python3.8 with env variables count 42
Info 12:10:31: Process Execution: > /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
> /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
Info 12:10:31: Process Execution: > /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
> /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
Info 12:10:31: Process Execution: > /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
> /usr/bin/python3.8 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v --ppid 134272
Info 12:10:31: Process Execution: > /usr/bin/python3.8 (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/xhtang/crypto-log" --config=/tmp/b00dafac-6062-4c9c-a0a1-5d0d7ab29989/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> /usr/bin/python3.8 (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/xhtang/crypto-log" --config=/tmp/b00dafac-6062-4c9c-a0a1-5d0d7ab29989/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
Info 12:10:31: Waiting for Jupyter Notebook
/usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(

[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.

[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log

[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:

[I 12:10:31.694 NotebookApp] http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 12:10:31.694 NotebookApp] http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98

Info 12:10:31: Process Execution: > /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 12:10:31.695 NotebookApp]  or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 12:10:31.694 NotebookApp] http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
[I 12:10:31.695 NotebookApp]  or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98

Info 12:10:31: Process Execution: > /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 12:10:31.695 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 12:10:31.694 NotebookApp] http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
[I 12:10:31.695 NotebookApp]  or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
[I 12:10:31.695 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 12:10:31.697 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/xhtang/.local/share/jupyter/runtime/nbserver-134543-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
     or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
Info 12:10:31: /usr/local/lib/python3.8/site-packages/traitlets/traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '/home/xhtang/crypto-log' instead of '"/home/xhtang/crypto-log"' – or use CUnicode.
  warn(
[I 12:10:31.692 NotebookApp] The port 8888 is already in use, trying another port.
[I 12:10:31.694 NotebookApp] Serving notebooks from local directory: /home/xhtang/crypto-log
[I 12:10:31.694 NotebookApp] Jupyter Notebook 6.3.0 is running at:
[I 12:10:31.694 NotebookApp] http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
[I 12:10:31.695 NotebookApp]  or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
[I 12:10:31.695 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:10:31.697 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/xhtang/.local/share/jupyter/runtime/nbserver-134543-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98
     or http://127.0.0.1:8889/?token=e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98

Info 12:10:31: Connecting to process server
Info 12:10:31: Connecting server kernel http://localhost:8889/
Info 12:10:31: Creating server with settings : {"baseUrl":"http://localhost:8889/","appUrl":"","wsUrl":"ws://localhost:8889/","token":"e30f0a8d076ac90951ee1b9ba730c2d22126dd5117c81f98","appendToken":true,"init":{"cache":"no-store","credentials":"same-origin"}}
Info 12:10:31: Connection complete server
Info 12:10:31: Server started.
[I 12:10:31.959 NotebookApp] Creating new notebook in 
Info 12:10:31: Process Execution: > /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
Info 12:10:31: installMissingDependencies /bin/python3.8
Info 12:10:31: IPykernel found previously in this environment /bin/python3.8
Info 12:10:32: Process Execution: > /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3.8 (daemon) ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
Info 12:10:32: Spec argv[0] updated from '/bin/python3.8' to '/bin/python3.8'
Warn 12:10:32: Falling back to Python Execution Service due to failure in daemon h [Error]: Failed to execute using the daemon, Traceback (most recent call last):
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py", line 13, in <module>
    for si in server_list:
  File "/usr/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 2387, in list_running_servers
    with io.open(os.path.join(runtime_dir, file_name), encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/xhtang/.local/share/jupyter/runtime/nbserver-97690.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/daemon/daemon_python.py", line 54, in _decorator
    return func(self, *args, **kwargs)
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/daemon/daemon_python.py", line 135, in m_exec_file
    return self._execute_and_capture_output(exec_file)
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/daemon/daemon_python.py", line 106, in _execute_and_capture_output
    func()
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/daemon/daemon_python.py", line 132, in exec_file
    runpy.run_path(file_name, globals())
  File "/usr/local/lib/python3.8/runpy.py", line 265, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/usr/local/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py", line 38, in <module>
    builtins.print.write(result.stdout.decode(encoding))
AttributeError: 'builtin_function_or_method' object has no attribute 'write'

    at a.processResponse (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:131513)
    at a.execFileWithDaemon (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:131860)
    at a.exec (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:128905)
    at d.wrapCall (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:170884)
    at b.getRunningJupyterServers (/home/xhtang/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/out/client/extension.js:2:574419) {
  category: 'daemon'
}
Info 12:10:32: Process Execution: > /usr/bin/python3.8 ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3.8 ~/.vscode-server/extensions/ms-toolsai.jupyter-2022.2.1020642448/pythonFiles/vscode_datascience_helpers/getServerInfo.py
Info 12:10:32: Starting a new session for kernel id = .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher, name = python383jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4
[I 12:10:32.411 NotebookApp] Kernel started: 98dbdffa-651d-4e87-b027-33bcb8de0706, name: python383jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4
Info 12:10:32: Waiting for idle on (kernel): 98dbdffa-651d-4e87-b027-33bcb8de0706 -> unknown
[W 12:10:32.444 NotebookApp] delete /Untitled-1-jvsc-b1ffece1-b2a1-4a84-845e-83284af9ee92.ipynb
Info 12:10:32: Finished waiting for idle on (kernel): 98dbdffa-651d-4e87-b027-33bcb8de0706 -> idle
Info 12:10:32: Started session for kernel .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:32: Finished connecting kernel .jvsc74a57bd05b3ded1ccb95c1d9bd405e7b823d9e85424cde40fbb5985eb47e999ef50e15b4./bin/python3.8./bin/python3.8.-m#ipykernel_launcher
Info 12:10:32: Executing silently Code (idle) = import sys\nprint(sys.executable)
Info 12:10:33: Executing silently Code (completed) = import sys\nprint(sys.executable)
Info 12:10:33: Executing silently Code (idle) = import site\nsite.addsitedir(site.getusersitepackages())\n__vsc_ipynb_file__ = "Untitled-1.ipynb"\n%con
Info 12:10:33: Executing silently Code (completed) = import site\nsite.addsitedir(site.getusersitepackages())\n__vsc_ipynb_file__ = "Untitled-1.ipynb"\n%con
Info 12:10:33: Waiting for idle on (kernel): 98dbdffa-651d-4e87-b027-33bcb8de0706 -> idle
Info 12:10:33: Finished waiting for idle on (kernel): 98dbdffa-651d-4e87-b027-33bcb8de0706 -> idle
Info 12:10:37: Execute Cells request 0, 1
Info 12:10:37: Execute Cell 0 untitled:Untitled-1.ipynb?jupyter-notebook
Info 12:10:37: Execute Cell 1 untitled:Untitled-1.ipynb?jupyter-notebook
Info 12:10:38: Cell 0 executed with state Success
Info 12:10:38: Cell 1 executed with state Success
Info 12:10:41: Loading webview. View is notset
Info 12:10:41: Loading web view...
Info 12:10:41: Webview panel created.
Info 12:10:42: Web view react rendered
Info 12:10:42: Executing silently Code (idle) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 12:10:42: Executing silently Code (idle) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 12:10:42: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 12:10:42: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 12:10:42: Executing silently Code (completed) = # Query Jupyter server for the info about a dataframe\nimport json as _VSCODE_json\nimport builtins as
Info 12:10:42: Executing silently Code (idle) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 12:10:42: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 12:10:42: Executing silently Code (completed) = import builtins\n_rwho_ls = %who_ls\nbuiltins.print(_VSCODE_getVariableTypes(_rwho_ls))
Info 12:10:43: Searching for token colors ...
Info 12:10:43: Attempting search for colors ...
Warn 12:10:43: Color theme Default Dark+ not found. Using default colors.
Info 12:10:43: Attempting search for colors ...
Warn 12:10:43: Color theme Default Dark+ not found. Using default colors.
Info 12:12:03: Searching for token colors ...
Info 12:12:03: Attempting search for colors ...
Warn 12:12:03: Color theme Default Dark+ not found. Using default colors.
Info 12:12:03: Attempting search for colors ...
Warn 12:12:03: Color theme Default Dark+ not found. Using default colors.

Coding Language and Runtime Version

Python 3.8.3

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Remote

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rchiodocommented, Mar 4, 2022

However this is non-standard, regular python & ipython (Jupyter) don’t work like this.

I believe this is false. That’s what I found in the original bug when debugging it: https://github.com/microsoft/vscode-jupyter/issues/8553

Jupyter was modifying the site packages list.

1reaction
OneMoreSecondcommented, Mar 4, 2022

I selected the default Python interpreter /bin/python3.8 for kernel. python3.8 -c 'import sys; print(sys.path)' gives

['', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/home/xhtang/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/site-packages/pycurl-7.44.1-py3.8-linux-x86_64.egg']

screenshot

The first cell is the expected result (like raw Python or IPython), and the second cell is unexpected after update. image

My output panel doesn’t have Jupyter Server Console in the drop-down list. There is only “Jupyter” and I have pasted it above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when things go wrong - The Jupyter Notebook
Jupyter doesn't load or doesn't work in the browser · Try in another browser (e.g. if you normally use Firefox, try...
Read more >
Jupyter notebook can't load installed package in conda ...
After conda install jupyter in the py3 env (and restarting the terminal session) it now correctly points to /home/gabriel/anaconda3/envs/py3/bin ...
Read more >
Installing custom and open-source Python packages - IBM
This section explains how to install custom or open-source Python packages if your Kubernetes Cluster does not have direct internet connectivity.
Read more >
Jupyter notebook: 500 : Internal Server Error - Google Groups
After updating aiida to version 2.0.1, and migrating my profiles, I cannot use jupyter notebook anymore, whereas the 'verdi shell' seems to work...
Read more >
Can't run jupyter notebook - General Usage - Julia Discourse
I can't seem to start jupyter notebook from Mac terminal. ... "/Users/alieftekhari/.julia/conda/3/lib/python3.7/site-packages/tornado/gen.py", line 742, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found