Run the Jupyter notebook in Virtual environments using pip

Run the Jupyter notebook in Virtual environments using pip

If we create a virtual environment and open up the jupyter notebook in it, we can face the problem of "no module found issue" . We can resolve this issue by following these steps.

  1. Create the virtual environment of any name using the following command.
    python3 -m venv myenv
    
  2. Activate the environment using the following command.
    source myenv/bin/activate
    
  3. Need to uninstall the following libraries, if exist in your system.
    • ipykernel
    • ipython
    • ipython-genutils
    • ipywidgets
    • jupyter
    • jupyter-client
    • jupyter-console
    • jupyter-core
  4. We can check the installed libraries using the following command.
    pip list
    
  5. If you find any above mentioned libarary, uninstall it using the following command.
    pip uninstall “first_library_name” “second_library_name””
    
  6. Install the required library using following command.
    pip install "library_name"
    
  7. Run the following command to open the jupyter notebook.
    pip install jupyter notebook