I am running VS Code on a Mac OS. I have installed Jupyter extension but I'm unable connect to my Python virtual environments. When I create a new virtual environment with Anaconda, VS Code appropriately recognizes the virtual environments but the ones I create manually do not work.
I have no problem launching Jupyter Notebook in the browser from the command line but I'd like to be able to use VS Code. Also, I have no issues running plain Python scripts in the virtual environment I have created.
I have tried the following steps:
Create a new virtual environment:
cd ~/.virtuaenvs/
python3 -m venv new_venv
Activate the new virtual environment:
source new_venv/bin/activate
Install ipykernel and jupyter
pip install ipykernel jupyter
Add environment to kernels list
python3 -m ipykernel install --name "new_venv" --user
Restart VS Code. But the new_venv does not show in my list of kernels when opening a Jupyter notebook.
Had to update the Jupyter extension, even though I had auto-update on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With