-1

I usually do the following commands to open my jupyter notebook through an environment:

run cmd   
D:  
cd folder\folder\   
.\env\Scripts\activate  
jupyter notebook  

Can I automate these cmd commands?

starball
  • 20,030
  • 7
  • 43
  • 238
ssyn
  • 1
  • 2

1 Answers1

0

If you are using Visual Studio Code, you can add your python.exe from your virtual environment to "path" (environment variable), then press Ctrl+Shift+P to open the command palette, and then select this python.exe as python interpreter and as the server to start Jupyter server.

Command palette

There are other options as well, for example using the execfile() command, or changing the default python interpreter globally: As can be seen in this post

EnTekker
  • 62
  • 10