CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 04:04:58 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=322.434185,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=630.885418,issue_conversation_sidebar-fragment;desc="issue_conversation_sidebar fragment";dur=50.589432,nginx;desc="NGINX";dur=1.238618,glb;desc="GLB";dur=100.757574
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: fd8fbbc
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=4jercsFksoP144%2Bm8zBAeJqu5ZHqPyCWGbAmlh0VCymiLNras4zXODUb5XSGt%2B35A3KlngLG4iHFOZo%2BhZS%2BqXkbZ3FvGK1fuWz0mIdyACEnlcoCCnEf5Qo78YLeyA6nO8C8MqPmy38SkWKIgi47xM9eAo%2B9vPO7GZLubOdTCE%2FkKfrMBTm%2FlrXZsjLtCtjf9%2BkMx3iNQ6FDyA0Qj3xQ%2FS6QCdiULqMGpbVTr%2BEXeIhmZXh5QR%2FKF6BVakgFBpqQZhhPhl6DHqVjNP%2B1fS0tTQ%3D%3D--noJbZ0ssIcdq9aDb--qyXA88kMGpV5FYingg6NlQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.589571129.1753243497; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 04:04:57 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 04:04:57 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BD4A:35EBF4:310B9D:445D5B:68805F69
Run cell does not use virtualenv Β· Issue #3800 Β· microsoft/vscode-jupyter Β· GitHub
No labelsNo typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Description
Environment data
- VS Code version: 1.28.2
- Extension version (available under the Extensions sidebar): 2018.10.1
- OS and version: macOS High Sierra 10.13.6
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
- Relevant/affected Python packages and their versions: all
Actual behavior
IPython kernels spawned on running cells does not use virtualenv, causing imports to fail.
Expected behavior
IPython from virtualenv should be used
Steps to reproduce:
- Create virtualenv
- Set python.pythonPath to virtualenv in .vscode/settings.json
- Install ipython, jupyter, and some other package (say matplotlib) in virtualenv
- Create a python file with just
import matplotlib
- Add
#%%
and run cell - Notebook preview opens and ImportError is thrown
Logs
Running get_ipython().run_line_magic("matplotlib", "inline")
reveals that the wrong IPython is used:
get_ipython().run_line_magic("matplotlib", "inline")
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
1 # %%
----> 2 get_ipython().run_line_magic("matplotlib", "inline")
3
4 print("hello, world")
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2283 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2284 with self.builtin_trap:
-> 2285 result = fn(*args,**kwargs)
2286 return result
2287
in matplotlib(self, line)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/magics/pylab.py in matplotlib(self, line)
97 print("Available matplotlib backends: %s" % backends_list)
98 else:
---> 99 gui, backend = self.shell.enable_matplotlib(args.gui)
100 self._show_matplotlib_backend(args.gui, backend)
101
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
3339 """
3340 from IPython.core import pylabtools as pt
-> 3341 gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select)
3342
3343 if gui != 'inline':
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/IPython/core/pylabtools.py in find_gui_and_backend(gui, gui_select)
274 """
275
--> 276 import matplotlib
277
278 if gui and gui != 'auto':
ModuleNotFoundError: No module named 'matplotlib'
Output from Console
under the Developer Tools
panel.
console.ts:136 [Extension Host] Python Extension: [I 21:00:15.098 NotebookApp] Serving notebooks from local directory: /var/folders/7_/vlgt1szj3gdcw4x8v587kg2m0000gn/T
console.ts:136 [Extension Host] Python Extension: [I 21:00:15.099 NotebookApp] The Jupyter Notebook is running at:
[I 21:00:15.099 NotebookApp] https://localhost:8888/?token=a9dcd3804f44df60a6cb2a29cab9442918c8c758d7f849a0
[I 21:00:15.099 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
console.ts:136 [Extension Host] Python Extension: [C 21:00:15.106 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
https://localhost:8888/?token=a9dcd3804f44df60a6cb2a29cab9442918c8c758d7f849a0
console.ts:136 [Extension Host] Python Extension: [I 21:00:15.287 NotebookApp] Kernel started: e4c82ade-2da6-43ae-81c8-c74ec83e7c4c
console.ts:136 [Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/e4c82ade-2da6-43ae-81c8-c74ec83e7c4c
console.ts:136 [Extension Host] Python Extension: [I 21:00:15.965 NotebookApp] Adapting to protocol v5.1 for kernel e4c82ade-2da6-43ae-81c8-c74ec83e7c4c
console.ts:136 [Extension Host] Kernel: connected (e4c82ade-2da6-43ae-81c8-c74ec83e7c4c)
console.ts:136 [Extension Host] Python Extension: Execute for import pandas as pd
import numpy
%matplotlib inline
import matplotlib.pyplot as plt silently finished.
console.ts:136 [Extension Host] Python Extension: Execute for %cd "/Users/jayanthkoushik/Projects/few-shot" silently finished.
console.ts:136 [Extension Host] Python Extension: [I 21:01:04.981 NotebookApp] 302 GET / (::1) 0.43ms
console.ts:136 [Extension Host] Python Extension: [I 21:01:04.988 NotebookApp] 302 GET /tree? (::1) 0.83ms
mirkolenz, bramsvs, mcdevitts, James-Yu, tenajima and 1 more
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You canβt perform that action at this time.