Can't run Jupyter Notebook with python 3.9 env

10,653

You can follow the steps below:

  1. conda create -n py39 python=3.9
  2. pip3 install --upgrade pip
  3. pip3 install jupyter
  4. Go to anaconda prompt
  5. Activate py39
  6. Run jupyter-notebook
  7. Run after changing path as per your machine : python C:\ProgramData\Anaconda3\envs\py39\Scripts\pywin32_postinstall.py -install
  8. Run : jupyter-notebook from anaconda prompt
  9. Check version of Python on Jupyter notebook.
Share:
10,653
Daniel
Author by

Daniel

Updated on June 22, 2022

Comments

  • Daniel
    Daniel almost 2 years

    I'm new to using python and conda (and linux for that matter) and I've had some trouble running a Jupyter notebook through a python 3.9 environment. I've noticed that the base 3.8.5 environment works (and allows me to open Jupyter 6.1.4) , but I'm not sure why. I've updated anaconda and conda through conda update conda and conda update anaconda and get the same

    # All requested packages already installed.
    

    In the anaconda-navigator GUI, when I try to use a py39 environment and click install on Jupyter, I notice it tries to install Jupyter version 6.0.3 and I also get this error.

    I've also tried to install pykernel into my env (not sure if it would've done anything to help my issue) in which I get:

    $conda install ipykernel
    Collecting package metadata (current_repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: \ 
    Found conflicts! Looking for incompatible packages.
    This can take several minutes.  Press CTRL-C to abort.
    failed                                                                                                                                      
    
    UnsatisfiableError: The following specifications were found
    to be incompatible with the existing python installation in your environment:
    
    `Specifications:
    
      - ipykernel -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
    
    Your python: python=3.9
    
    
         Found conflicts! Looking for incompatible packages.
        This can take several minutes.  Press CTRL-C to abort.
        failed                                                                                                                                    
        
        UnsatisfiableError: The following specifications were found
        to be incompatible with the existing python installation in your environment:
        
        Specifications:
        
          - ipykernel -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
        
        Your python: python=3.9
    

    I'm assuming that is why Jupyter was unable to install notebook. I'm really new to this stuff so if any more detail is required from me, please let me know. I don't really understand this issue and can't find anything similar.

  • Guillem
    Guillem over 3 years
    Not working for me, also your answer is for windows, OP asked for Linux.