Installed package on Anaconda not accessible in Jupyter Notebook - r

I installed Anaconda on an external drive inode/directory/0C707E95707E84EC. I opened Anaconda-Navigator to install r-aer in base(root). So far so good. Then I start Jupyter Notebook from inode/directory/0C707E95707E84EC and am unable to access the aer library.
This all started last week. when I was unable to install aerand after a circus of affairs I finally ended up updating Anaconda and then having to delete and reinstall it. All I want to do is access aeron Jupyter Notebook. The image below (last image) shows library(raer); I have tried many different command versions, e.g. library("Raer")and variations thereof.
I know that AER is installed in Anaconda . Could this be a path issue?
calling library in Jupyter Notebook

for any file on desktop (win 10) Jupyter Notebook can see that file without specifying the path, try putting that file on desktop.
see this it could help:
specifying R library path for RKernel in Anaconda Jupyter notebook_Stack OverFlow

Related

Confusing Jupyter Notebook packages on Anaconda: jupyter or notebook?

I have been wondering about this for a while and cannot seem to find a reliable source to explain this.
I want to install Jupyter Notebook to my Conda environment, and when I search for it on https://anaconda.org/, there are 2 very popular packages available and both of them can open a working Jupyter Notebook with no problem.
https://anaconda.org/anaconda/jupyter
https://anaconda.org/anaconda/notebook
However, according to the Project Jupyter's official documentation, the pip command to install Jupyter Notebook is:
pip install notebook
And nowhere in the documenation, it mentions anything about this jupyter package.
Question
So what exactly is this jupyter package?
It does not have any license, no description, no references to the Project Jupyter website, and the package just looks unmaintained with version 1.0.0 for a while now.
Yet it has > 200k total downloads and when installed, it is able to open Jupyter Notebook properly.
I find it very confusing and easy to lead to dependencies problem in the future in Conda environment.
It's clear from the Project Jupyter instructions that the canonical package name for installing Jupyter Notebook is notebook. There are parallel jupyter and notebook packages in PyPI as well as the anaconda channel you mention. However, it is clear that notebook is regularly updated (as of writing, notebook on anaconda was last updated on 30 July 2022, jupyter on 22 January 2017!) The jupyter package on PyPI has the description "Jupyter metapackage. Install all the Jupyter components in one go." (However, I tested the jupyter anaconda package and it only runs notebook, not eg Jupyterlab.)
I would guess that the jupyter package is left over from when Project Jupyter was just notebooks, without other projects like Jupyter Lab and Jupyter Hub. Of course in installing one should follow the official instructions, since the older package is not kept up to date. The fact that it has a lot of downloads only shows (as does this question) that python package management and the Jupyter ecosystem are confusing for many...

Cannot start jupyter notebook after deleting anaconda

What happened:
I have had Pip and Anaconda installed on my Mac. I tried to tidy up and decided to delete Anaconda since I assumed I only needed Pip for my Python programming.
My question:
I have been using jupyter notebook for my university project. Apparently, it had been installed by me using anaconda. Now that anaconda is gone, when I try running jupyter notebook, it is still looking in the deleted anaconda directory and throws the following error in the command line
/Users/username/anaconda3/bin/jupyter: No such file or directory
Furthermore, I now get this error when installing jupyter using pip3:
WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are installed in '/Users/username/Library/Python/3.8/bin' which is not on PATH.
Unfortunately, I barely have an idea of what I am doing when installing anything using the command line. Could you help me out in fixing the issue?

Issue running juypter notebook after installing Anaconda

I recently installed the latest version of Anaconda which i require for a course i am doing in data analytics.
I need to use jupyter notebook but it won't run for me ..i keep getting an error jupyter notebook not found.
In the anaconda prompt i ran command conda list and juypter is in the list. The version of juputer showing is version 4.4.0.
I tried then to launch jupyter notebook through anaconda navigator but no luck either. I did notice though that in Anaconda navigator the version of juypter notebook shows as 5.6.0. The conda list command shows version 4.4.0. Strange. I then decided from navigator to install version 4.4.0 of jupyter. This has allowed me to run jupyter notebook but i cant code in the notebook and it says kernel not connected. A lot of errors also showing in command prompt.
Any help would be much appreciated as i have uninstalled and reinstalled Anaconda over 14 times and im getting nowhere. Two assignments due in on the 11th November so getting quite worried. Im very new to programmjng and from a finance background.
Im running windows 7.
Kind regards
Rebecca

Jupyter Notebook on Windows 10

I am trying to open Jupyter Notebook on Windows 10 and I am having trouble. I already downloaded and installed it. When I click on the Jupyter Notebook icon in my start menu, a black terminal appears titles Jupyter Notebook. Then I just disappears after that like nothing happened.
Things I have done to combat this issue:
I downloaded VirtualBox with Ubuntu and downloaded the Linux version there. However, it stated it could not be installed since it was not a 64-bit system. I tried to download the 32 bit version but the download always failed.
Next I add the the link http://localhost/* to my Kapersky Internet anti-virus exceptions page thinking it was preventing Jupyter from opening. This didn't work and turning off the firewall completely also didn't work.
Any help would be great help!
There are several ways to use jupyter notebook under windows, especially windows 10 professional.
My favorite way is the lovely ubuntu subsystem of windows 10. You can install it directly from the app store, which is free for all windows 10 users. Then install jupyter notebook from the subsystem:
apt install python3-dev python3-pip
pip3 install jupyter
or you can just do
apt install python3-dev python3-pip jupyter
then just run
jupyter notebook
open any windows browser, copy paste the localhost.... thing from ubuntu terminal
then you can using jupyter notebook with a linux core.
As mentioned by #cricket_007, you have to run jupyter first before opening notebooks. From the terminal, run:
> jupyter notebook
After a few seconds, a server will start. If your dashboard does not open automatically, point your browser to http://localhost:8888. Note: if you installed Jupyter with Anaconda, there should be a shortcut you can click to do all of the above.
The dashboard will point to your default working directory. Place notebooks in this directory or navigate to your notebook's directory to open it through the browser.
Should you wish to change the default working directory, see more on configuring notebook paths in the docs.

specifying R library path for RKernel in Anaconda Jupyter notebook

First let me preface this with the disclaimer that I'm new to R, but a longtime Python power user. Given that I love the conda ecosystem and the Jupyter notebook, I'm trying to set them up as my R development environment as well.
So using the instructions at: https://www.continuum.io/blog/developer/jupyter-and-conda-r I've set up a Jupyter Notbook that using an RKernel that should be hitting the installation of R installed in my Anaconda folder (I would think anyway).
Getting it setup was easy peasy and everything is working great for standard R stuff but my analysis requires some R libraries that are not available in r-essentials channel. No problem, I think I know how to install an R library. I go to "C:\Anaconda\R\bin\x64\Rgui.exe" and install rgdal, dismo, and some other packages. To check my work I looked in C:\Anaconda\R\library and there they are.
But when I run a jupyter notebook from the Anaconda command prompt. And start a new R notebook I get a "Error in library(dismo): there is no package called 'dismo'" Wait a sec, I run a ".libPaths()" from the notebook and it looks like its pointing
You can add .libPaths('path_where_your_packages_are') in a code cell at the beginning of your notebook to tell jupyter where your packages are. For me that was .libPaths('~/R/win-library/3.2') (work-around from discnerd who filed this issue on github).
To find out the path to your packages, just install a random package in R and wait for the location to be printed to the console.
More details (likely specific to my system/installations): When running .libPaths() in R, I got 2 locations: one for which admin rights were required for writing, and one for which admin rights were not required for writing. While packages installed through R land in the location where admin rights are not required, jupyter looks at the location where admin rights are required.
You can find out the path to your library with installed.packages()

Resources