IJulia installation : miniconda installation infinite loop - julia

I'm trying to install IJulia ( I ran Pkg.add("IJulia") and now running Pkg.build("IJulia") says the package is installed ), but constantly getting these messages for a long while now :
INFO: Downloading miniconda installer ...
INFO: Installing miniconda ...
And it keeps going, It also occasionally gets ~50% CPU usage.
I have full Anaconda Python installed (Py3) in Windows 10. So is that the issue ? Nothing happened when I tried installing it on my other Linux machine.
EDIT: Removing and re-installation didn't work, neither did setting Anaconda Jupyter as Jupyter environment for Julia. I get an old version error, as it detects that my Jupyter is of version 0.0.0 .

I had similar symptoms installing IJulia on my Windows computer. I was not able to determine what was preventing the Julia package manager from installing miniconda, but I was able to work around the issue by manually installing Miniconda and Jupyter and setting ENV["JUPYTER"] to the full path, including executable name, of the jupyter program. Without the executable name it reported version 0.0.0 as your question indicated and then fell back to install miniconda (which failed repeatedly).
julia> ENV["JUPYTER"]="<HOME>\\Miniconda2\\Scripts\\jupyter.exe"
"<HOME>\\Miniconda2\\Scripts\\jupyter.exe"
julia> Pkg.build("IJulia")
...
INFO: Building IJulia
INFO: Found Jupyter version 4.3.0: <HOME>\Miniconda2\Scripts\jupyter.exe
INFO: Installing Julia kernelspec julia-0.6
[InstallKernelSpec] Installed kernelspec julia-0.6 in <HOME>\AppData\Roaming\jupyter\kernels\julia-0.6
julia> using IJulia
INFO: Precompiling module IJulia.
julia> notebook()
Like you, I did not encounter this problem on my Linux install. The Readme.md states on Linux it will look for jupyter in your path, but on Mac and Windows it will default to installing miniconda for itself which failed. Based on your question I think you want to use your preexisting Jupyter install so this should work. The miniconda install problem may need to be reported as an issue to the IJulia folks as a separate problem.

Related

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?

IJulia fails with precompiling LoadError

I have installed Julia 1.5.3 on Ubuntu but IJulia falis with LoadError as shown in the screenshot.
The first path to the conda environment is very wrong, this is running on Ubuntu. The path shown below Precompliling is a WINDOWS path.
Where in the scripts can I correct this reference and allow IJulia to install ?
It looks like you have had an Anaconda installation that is not available anymore yet your paths are pointing to it. The best thing to do is to install an Anaconda inside Julia. This also works best in practice.
using Pkg
ENV["PYTHON"]=""
Pkg.add("PyCall")
Pkg.build("PyCall")
Pkg.add("Conda")
using Conda
Conda.runconda(`install jupyter --yes`)
Pkg.build("IJulia")
Now your code will work.
using IJulia
notebook(dir=".")
Remember also to try Pluto Pkg.add("Pluto") - a new generation of notebooks for Julia.

Installing R 4.0.2 version

I used to work in R 3.4.0 version. Hovewer, this version doesn't support such packages as keras and tensorflow.
I was adviced to upgrade my R version to the newest one.
I downloaded the most recent R version 4.0.2 from the official site, then ran the following code:
install.packages("keras")
library(keras)
install_keras()
And got the following error:
Error in install_keras() :
You should call install_keras() only in a fresh R session that has not yet initialized Keras and TensorFlow (this is to avoid DLL in use errors during installation)
After this, when I tried to quit R session by q() , I faced the following error:
Error: option error has NULL value
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Error: option error has NULL value
I've never faced such an error before. When I used old R version, I typed q() and then had to choose between y and n. No errors appeared.
I'm asking you to help to to solve this problem.
You need to create a new environment and then you can install R 4.+ in Anaconda. Follow these steps.
conda create --name r4-base
After activating r4-base run these commands
conda activate r4-base
conda install -c conda-forge r-base
conda install -c conda-forge/label/gcc7 r-base
Finally, you will notice r-basa version 4 will be installed.
Thereafter, you can install any supported packages. But with this only, you won't have the ability to use it in the Jupyter notebook. You need to install install.packages('IRkernel') and Jupyter notebook as well if you want to use it. Otherwise you are good to go with R-Studio.
For Jupyter Installation and RKernel.
conda install jupyter
Then open the R console. Write in R console
install.packages('IRkernel')
IRkernel::installspec()
Congrats! You can use Notebook for Python and R.
Find the location of R.exe on your computer. In my computer, this executable is at
C:\Program Files\R\R-3.4.3\bin
Open another Anaconda Prompt as Administrator and change directories to wherever R.exe is on your computer with cd file path. On my computer, it’s cd C:\Program Files\R\R-3.4.3\bin, but it might be different for you.
Then run R from within Anaconda Prompt in Admin mode with R.exe
You’ll notice that you’re in an R session. From here, run the following three commands into the terminal.
install.packages("devtools")
devtools::install_github("IRkernel/IRkernel")
IRkernel::installspec()
In order, they (1) install the devtools package which gets you the install_github() function, (2) install the IR Kernel from GitHub, and (3) tell Jupyter where to find the IR Kernel.
Open Jupyter notebook and enjoy your new R kernel!
Get more information here
#Rheatey Bash works perfectly. but i was facing python.exe this program cant start because api-ms-win-core-path-l1-1-0.dll python system error. this is a problem running on windows 7 but i resolved this issue by installing the kernel following https://richpauloo.github.io/2018-05-16-Installing-the-R-kernel-in-Jupyter-Lab/ and it works fine

Problems installing RStudio in anaconda environment (base) on ubuntu

I am not able to get rstudio into my anaconda base environment. I have tried installing it from the GUI and from the command line. In the GUI it just says that it is installing and either A) crashes, or B) stays on the installing screen forever.
I am using the following code in the base env.
conda install rstudio
System: Ubuntu 19.10 on vitualboxVM with a mac os mojave host.
Also, It is trying to install pypq, is this the problem? This doesn't seem like a package I need for my R scripts, do popular R packages depend on it? If not, can I tell anaconda just to skip installing it?
The terminal log is very long so I attached the image instead of copying the code:
UPDATE: I can install in another env, but not base.
Yes, that's it. For some reason you cannot install R Studio in the base environment but you're obliged to create a specific R environment to install it.

How do you add Jupyter Notebook kernels for prior versions of Julia?

I am using a Windows machine and trying to have Jupyter Notebook kernels for multiple versions of Julia (0.7.0 and 1.1.1) because package AWS does not support the latest version, but does support 0.7.0.
I had Julia 1.1.1 installed on my computer first and got something similar to the following error when I tried to install package AWS: https://github.com/JuliaLang/Pkg.jl/issues/792
Then I installed Julia 0.7.0 and was able to install AWS in the Julia 0.7.0 terminal with Pkg.add("AWS") with no problems.
In the Julia 0.7.0 terminal, I installed IJulia again with Pkg.add("IJulia") and restarted my Jupyter notebook instance. Now I'd like to use AWS via Jupyter notebook but when I create a new one, only Julia 1.1.1 appears.
I ended up having success by showing which kernels I had using jupyter kernelspec list in terminal, which showed where my other Julia kernel was located.
>>> jupyter kernelspec list
Available Kernels:
julia-1.1 C:\Users\{%USERNAME%}\AppData\Roaming\jupyter\kernels\julia-1.1
python3 C:\ProgramData\Anaconda3\share\jupyter\kernels\python3
I navigated to the file path listed after julia-1.1
Created a julia-0.7 folder in that same directory
Copied over contents from the julia-1.1 folder
Edited the kernel.json file by replacing every instance of julia-1.1.1 with julia-0.7.0
What I ended up having success with seems like a very rudimentary way to solve this problem. I'd like a more elegant way to achieve the same result, similar to when adding multiple kernels for different versions of Python. (Using both Python 2.x and Python 3.x in IPython Notebook)
Please help, thank you!
You (probably) just need to Pkg.build("IJulia") on the second Julia version.
Since Julia 0.7 the package manager uses separate directories for each version of a package, meaning that, from the package managers perspective, the package is already installed, and no downloading or building is performed when you install the same version from a different Julia version. The package manager does not know, however, that IJulia needs to be rebuilt for this new Julia version. You can trigger the build manually by Pkg.build("IJulia").

Resources