1

I created a tensorflow conda environment called tf, it works, but when I try to install the following to run jupyter notebook:

conda install ipykernel (works)
python -m ipykernel install --user --name=tf (works)
jupyter notebook (error)

the command jupyter gives the following error:

(tf) C:\Users\Anonymous>jupyter
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

options:
  -h, --help     show this help message and exit
  --version      show the versions of core jupyter packages and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable format.
  --json         output paths as machine-readable json
  --debug        output debug information about paths

Available subcommands: kernel kernelspec migrate run script troubleshoot

Please specify a subcommand or one of the optional arguments.

and when running:

(tf) C:\Users\Anonymous>jupyter notebook
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

options:
  -h, --help     show this help message and exit
  --version      show the versions of core jupyter packages and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable format.
  --json         output paths as machine-readable json
  --debug        output debug information about paths

Available subcommands: kernel kernelspec migrate run script troubleshoot

Jupyter command `jupyter-notebook` not found.

What is wrong?

Kim
  • 77
  • 7

1 Answers1

2

Based on your list of instructions, I'm not confident you've actually installed Jupyter at all in your environment. It looks like whatever command you are running is some residual dependency package from somewhere since it doesn't even have the notebook command as an option.

Try installing Jupyter into your environment like so or from the official documentation website.

Microbob
  • 672
  • 5
  • 20
  • 1
    You're right. I only created an environment. I then installed the ipykernel, and I thought Jupyter is installed together with it. – Kim Aug 14 '23 at 01:39
  • @Kim why some people add `-y`in `conda install -y jupyter` ? – Kim Aug 14 '23 at 03:11
  • 1
    `-y` just accepts any prompts that show up (i.e. the one that asks if you want to install this package) – Microbob Aug 14 '23 at 03:15