Then, add the virtual environment with your preferred name to identify the virtual environment: py -m ipykernel install -name “p圓.8-env” Check your kernel list To add a virtual environment to the Jupyter kernel list, we need to install ipykernel from inside the environment variable (after activating the environment) first: install pip install ipykernel To close the virtual environment: deactivate Add virtual environment to the Jupyter kernel list To start the virtual environment from Windows Command Prompt: env\Scripts\activate To start the virtual environment from Windows PowerShell (VSCode default terminal): env\Scripts\Activate.ps1 Here, the envis the name of the virtual environment folder. You can specify the Python version used in the virtual environment by typing the version as follow: py -3.8 -m virtualenv env Python in Windows is distributed with py the launcher that supports multiple Python versions. See this StackOverflow answer for more details. Other virtual environment managers such as venv also could be used. Here, I’m using virtualenv that can be installed using: pip install virtualenv To install Jupyter Notebook: pip install notebook Install virtual environment manager To install JupyterLab (recommended): pip install jupyterlab First, install JupyterLab or Jupyter Notebook from your main Python installation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |