Package installation at R-jupyter

I am using R-jupyter for coding into R. But I am not being able to install fpp3 by (install.packages('fpp3')) at Jupytar. A very long text appears once I write that command. Also library (tssible) does not work.

Can anyone kindly suggest a solution.

Jupyter uses conda environments, so you are supposed to install R packages using conda commands not directly from CRAN with install.packages() try with this command on a terminal (not the R console).

conda install r-fpp3

Still not working!

Error in parse(text = x, srcfile = src): :1:7: unexpected symbol
1: conda install
^
Traceback:

It seems you are not using a system terminal, I have only used conda on Windows and there I use a conda terminal provided by the Anaconda distribution.

The more detail you provide about what you are doing, the better.

fpp3 is not getting installed at terminal also.

Following text appears in terminal!
PackagesNotFoundError: The following packages are not available from current channels:

  • r-fpp3

Jupyter is more commonly used by Python people but this forum is more R oriented so few people here has experience working with R in Jupyter. It is still possible that somebody here knows how to help you but I think you would have better luck by asking this on a Jupyter related forum.

can you kindly let me know any forum link where I can ask for this help. It will be really appreciating

The main problem I can see here is that we're still not sure about your general setup.

Can you maybe start with providing a screenshot of the actual output including the command you are running
(start and end with a few lines after and before is enough ) ?

I posted the screenshot. All I wanted to install fpp3 package at R-Jupyter for time series analysis. But its becoming a nightmare!

You are getting there. It would have been nice to see the end of the error messages, too, but the information is good enough to point you to two possible solutions based.

My main assumption is: Your repository settings are a little bit out-of-date. As a consequence, R only finds outdated binary packages and hence wants to compile some of the package dependencies using the latest versions of each packages and fails.

Two possible solutions

  1. Use the most up-to-date CRAN repo with Windows binaries via
install.packages("fpp3", available = available.packages(type = "win.binary", repos="https://cran.r-project.org"))
  1. Install Rtools42. This will contain all the needed compiler toolchains so that install.packages("fpp3") will be able to build some of the packages from source.

If neither of the two options works, please share the complete set of error messages including the command that triggered the error. If it is too long to paste, you also can upload files here.

thanks a lot for your kind support. On the first possible solution, the following output appears. I wanted to install fpp3 for the tsibble function. But still same.

on second solution, the same screen appears.

The error messages indicate that you seem to have some package inter-dependency conflicts. The message "package was built under R version 3.6.3" is only the warning. The real error with impact is the namespace message below.

In order to fix this I would suggest the following. Can you please update all the installed packages via

update.packages(type = "win.binary", repos="https://cran.r-project.org")

If that still fails, you also simply can install the pillar package like you installed fpp3 which should update pillar to a version larger than 1.5.1. If you then get namespace errors for other packages, you can repeat the install for these packages, too.

Let me know how this works out.

Thanks a lot sir for your advice. Unfortunately none of these are working. The first one never run to next. The second one shows same error.


So something is still borked in your set up.

When the first one ran, did you check if there were R processes running on your computer ? It could very well be that the update of all installed packages can take some time. What does

paste("installed packages", dim(installed.packages())[1])
sessionInfo()
paste("libPath")
.libPaths()
paste("repo info")
options()$repos

report on your system ?

As for the second advice - I probably was not very clear, but I wanted you to install pillar, tsibble and fpp3like

install.packages("pillar", available = available.packages(type = "win.binary", repos="https://cran.r-project.org"))
install.packages("tsibble", available = available.packages(type = "win.binary", repos="https://cran.r-project.org"))
install.packages("fpp3", available = available.packages(type = "win.binary", repos="https://cran.r-project.org"))

So if for example pillar had another namespace collision you then could install this other package using the same command and so on.

my apology sir...Till same......attached 3 screensht as its longer.



This is all good stuff, but at this point in time I would suggest that we reinstall R completely.

So, please run in a terminal (You can select that from the jupyter environment)

conda remove r 

Then, clean out/delete any content in the folder that you identified via the .libPaths() call using your file browser

Finally, install R again via

conda install -c r r 

in a terminal, too.

Once you achieved this, you should be able to install the needed packages seamlessly.

Please note: The above commands may either be executed with admin privileges in the conda base environment or via normal user level privileges in a custom environment that you may have had generated in the past for this purpose.

PS: At some point you also could move from r to r-base in conda. Latest conda built R version available with r is 3.6.x while with r-base the latest is 4.2.0. For now however I strongly suggest to stick with r.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.