title: Jupyter runs terminal in virtual environment but ipynb in base python
body: <p>I am trying to run Jupyter in a conda virtual environment. I have activated my environment and if I run python from the terminal it runs the virtual environment correctly.</p>
  
  <p>However if I launch jupyter from within my virtual environment (by opening a Windows command prompt, typing <code>conda activate hqb-api2</code> and then <code>jupyter lab --no-browser</code>), the .ipynb files are running a kernel using the base python installation rather than the virtual environment. You can see this by printing <code>sys.prefix</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/AWYhu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AWYhu.png" alt="enter image description here"></a></p>
  
  <p>However, if I launch a terminal in Jupyter instead of a .ipynb file, then it correctly uses the virtual environment:</p>
  
  <p><a href="https://i.stack.imgur.com/dUWkg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dUWkg.png" alt="enter image description here"></a></p>
  
  <p>lastly, here is a subsection from <code>pip list</code> showing the relevant jupyter packages:</p>
  
  <p><a href="https://i.stack.imgur.com/ttlPM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ttlPM.png" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong?</p>