Documenting this now so future me does not need to spend an entire day figuring out how to install jupyter notebook on linux. Hopefully this will be useful for anyone searching on the internet
I was originally going to post this in the small linux problem thread, but it was a long post and I decided this is worth its own thread. Not so much a problem now that I figured it out. but I kept running into this issue when trying to use conda.
conda create WARNING: A directory already exists at the target location '/usr' but it is not a conda environment. Continue creating environment (y/[n])? y
CondaValueError: either -n NAME or -p PREFIX option required, try "conda create -h" for more details
I couldn’t figure out how to solve this issue, instead of looking up how to install conda, I instead nuked my fedora installation and reinstalled to fedora 31
later when I reinstalled fedora I ran into the issue again, but this time I didn’t install conda. So after spending a day reinstalling Fedora, I decided to look up how to install conda
get to the directory where you downloaded the installer files
I found it easier to use the explorer to the directory right click open this in terminal
run the bash commands
bash Miniconda3-latest-Linux-x86_64.sh
// or if you need anaconda
bash Anaconda-latest-Linux-x86_64.sh
run the command for initializing conda for fish (if you use fish)
conda init fish
boom now you have conda installed.
5. Now that you have anaconda/miniconda installed, you can run the following command to install jupyter notebook
conda install jupyter
Bonus installing pandas. Jupyter and python is pretty bare if you don’t have any libraries for data analysis. Lets install pandas. In any terminal you want/have init conda, run the following command
For whatever reason, Jupyter doesn’t have a native autocomplete
I found some good suggestions here
all the instructions here are from the stack overflow page
If you are looking for a more traditional autocomplete where the autocomplete tells you what the function does and the parameters needed, try hinterland.
Hinterland Install Instructions
Run this command in either fish or in your regular terminal, it will install a extensions tab into your file browser page of jupyter
you could also run this command to enable hinterland
jupyter nbextension enable hinterland/hinterland
I am using tabnine, which uses deep-learning for autocompletion, it doesn’t have the descriptions like hinterland, but it is better at noticing trends, which is nice if you want to avoid copy pasting and editing the copies.
Another great option to use Jupyter is via Visual Studio Code. It comes with autocomplete built in, can display plots and most of the other things you’d want from jupyter. Best of all VS Code plays nicely with git and debuggers because it uses plain python files rather than special notebooks.
A bit of a necro but given that JupyterLab is supposed to take the place of Jupyter notebooks I think it stands to point out, that a sizable chunk of the solutions for linting or completion don’t seem to work anymore.
I did find jupyterlab-lsp though which I hope will let me use what I have in place for vim but if anyone else has Lab running, it would be nice to hear from them and their setup.
Interesting.
Looks good for people who have never used terminal before.
Though I still prefer my method because setting the directory is easier if I have multiple drives. By default, jupyter launches in your home directory, which is nice if you have all your projects there.