Reputation: 15
In almost every tutorial that I have seen, it is suggested to install anaconda in order to work with jupyter notebooks in Visual Studio Code, but I don't want all the packages that anaconda offers. Is there any other way to do this?
Upvotes: 1
Views: 10681
Reputation: 441
I was facing a problem with no run option showing in notebook inside VSCODE. I followed below steps:
-installed python (i got 3.9) -installed Jupyter Notebook from pip
pip install notebook
-open VSCODE, install python extension (it comes with jupyter and pylance)
-in VSCODE, ctrl+shift+p > python:select interpreter
(I was having problem here with error 'No interpreter found'. I solved it by ctrl+shift+p >preferences : Open Settings (JSON)
and putting "python.defaultInterpreterPath": "C:\Python39\python.exe")
-then installing ipykernel
pip install ipykernel --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org
-then I had to create .ipynb file manually in VSCODE by creating an new file and saving it in format .ipynb
Voila!! jupyter notebook is running.
Upvotes: 0
Reputation: 8411
Have you installed the Python
extension, it is bound with Jupyter
and Pylance
extensions.
And you can create the jupyter notebook with the command of Jupyter: Create New Jupyter Notebook
:
And you can switch the kernels:
After you selected the python interpreter in the Jupyter Notebook, if this environment has not installed the related packages, it will prompt this:
You only need to click install, then the Jupyter extension will help you to install all the packages.
Upvotes: 3
Reputation: 1804
Yes. Jupyter does not need to have anaconda installed. You could install it in any python environment with pip install jupyter[all]
.
I do not know how to change the default jupyter environment, but you could start Jupiter notebook from the terminal (using jupyter notebook
command) and then copy the link and use it as an exiting server.
Upvotes: 3