Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load gganimate library. Getting this error #123

Closed
rahulxc opened this issue Aug 5, 2018 · 9 comments
Closed

Unable to load gganimate library. Getting this error #123

rahulxc opened this issue Aug 5, 2018 · 9 comments

Comments

@rahulxc
Copy link

rahulxc commented Aug 5, 2018

Getting this error while trying to load gganimate

Error: package or namespace load failed for ‘gganimate’:
object ‘.complete_states’ is not exported by 'namespace:tweenr'
In addition: There were 38 warnings (use warnings() to see them)v

@thomasp85
Copy link
Owner

I think I responded on twitter? tweenr and transformr needs to be updated to the latest github versions uising:

devtools::install_github('thomasp85/tweenr')
devtools::install_github('thomasp85/transformr')

reopen if it doesn't fix

@dataders
Copy link

dataders commented Apr 11, 2019

EDIT my mistake was installing gganimate from github...

@thomasp85 I tried this, but when I try library(gganimate) i get:

Error: package or namespace load failed for ‘gganimate’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘tweenr’ 0.1.5.9999 is being loaded, but >= 1.0.1 is required

when i tried installing tweenr from github, this was the console output

devtools::install_github('thomasp85/tweenr')
Downloading GitHub repo thomasp85/tweenr@master
√  checking for file 'C:\Users\anders.swanson\AppData\Local\Temp\Rtmp2XX2Ur\remotesdf683eb15a30\thomasp85-tweenr-17401ad/DESCRIPTION' (373ms)
-  preparing 'tweenr':
√  checking DESCRIPTION meta-information
-  cleaning src
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'tweenr_0.1.5.9999.tar.gz'
   
Installing package into �C:/Users/anders.swanson/Documents/R/win-library/3.5�
(as �lib� is unspecified)
* installing *source* package 'tweenr' ...
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/g++  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O3 -Wall  -std=gnu99 -mtune=generic -c easing.c -o easing.o
C:/Rtools/mingw_32/bin/g++  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic -c interpolators.cpp -o interpolators.o
interpolators.cpp: In function 'Rcpp::DataFrame numeric_element_interpolator(Rcpp::NumericVector, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:567:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::DataFrame colour_element_interpolator(Rcpp::NumericMatrix, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:608:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::DataFrame constant_element_interpolator(Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:658:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List list_element_interpolator(Rcpp::List, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:701:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List numlist_element_interpolator(Rcpp::List, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:752:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::NumericVector numeric_fill_interpolator(Rcpp::NumericVector, Rcpp::CharacterVector)':
interpolators.cpp:1187:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::NumericMatrix colour_fill_interpolator(Rcpp::NumericMatrix, Rcpp::CharacterVector)':
interpolators.cpp:1209:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::CharacterVector constant_fill_interpolator(Rcpp::CharacterVector, Rcpp::CharacterVector)':
interpolators.cpp:1230:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List list_fill_interpolator(Rcpp::List, Rcpp::CharacterVector)':
interpolators.cpp:1251:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List numlist_fill_interpolator(Rcpp::List, Rcpp::CharacterVector)':
interpolators.cpp:1276:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'double easePos(double, std::string)':
interpolators.cpp:280:10: warning: 'p_new' may be used uninitialized in this function [-Wmaybe-uninitialized]
   return p_new;
          ^
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o tweenr.dll tmp.def RcppExports.o easing.o interpolators.o -LC:/PROGRA~1/R/R-35~1.3/bin/i386 -lR
installing to C:/Users/anders.swanson/Documents/R/win-library/3.5/tweenr/libs/i386

*** arch - x64
C:/Rtools/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic -c RcppExports.cpp -o RcppExports.o
C:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -std=gnu99 -mtune=generic -c easing.c -o easing.o
C:/Rtools/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-35~1.3/include" -DNDEBUG  -I"C:/Users/anders.swanson/Documents/R/win-library/3.5/Rcpp/include"        -O2 -Wall  -mtune=generic -c interpolators.cpp -o interpolators.o
interpolators.cpp: In function 'Rcpp::DataFrame numeric_element_interpolator(Rcpp::NumericVector, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:567:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::DataFrame colour_element_interpolator(Rcpp::NumericMatrix, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:608:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::DataFrame constant_element_interpolator(Rcpp::CharacterVector, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:658:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List list_element_interpolator(Rcpp::List, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:701:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List numlist_element_interpolator(Rcpp::List, Rcpp::CharacterVector, Rcpp::IntegerVector, Rcpp::CharacterVector)':
interpolators.cpp:752:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 0; j < ease_points.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::NumericVector numeric_fill_interpolator(Rcpp::NumericVector, Rcpp::CharacterVector)':
interpolators.cpp:1187:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::NumericMatrix colour_fill_interpolator(Rcpp::NumericMatrix, Rcpp::CharacterVector)':
interpolators.cpp:1209:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::CharacterVector constant_fill_interpolator(Rcpp::CharacterVector, Rcpp::CharacterVector)':
interpolators.cpp:1230:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List list_fill_interpolator(Rcpp::List, Rcpp::CharacterVector)':
interpolators.cpp:1251:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'Rcpp::List numlist_fill_interpolator(Rcpp::List, Rcpp::CharacterVector)':
interpolators.cpp:1276:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (j = 1; j < easepos.size(); ++j) {
                     ^
interpolators.cpp: In function 'double easePos(double, std::string)':
interpolators.cpp:280:10: warning: 'p_new' may be used uninitialized in this function [-Wmaybe-uninitialized]
   return p_new;
          ^
C:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o tweenr.dll tmp.def RcppExports.o easing.o interpolators.o -LC:/PROGRA~1/R/R-35~1.3/bin/x64 -lR
installing to C:/Users/anders.swanson/Documents/R/win-library/3.5/tweenr/libs/x64
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'tweenr'
    finding HTML links ... done
    display_ease                            html  
    dot-complete_states                     html  
    dot-get_last_frame                      html  
    dot-max_id                              html  
    reexports                               html  
Rd warning: C:/Users/anders.swanson/AppData/Local/Temp/RtmpiWo9NT/R.INSTALL47c86a946472/tweenr/man/reexports.Rd:14: file link '%>%' in package 'magrittr' does not exist and so has been treated as a topic
    tween                                   html  
Rd warning: C:/Users/anders.swanson/AppData/Local/Temp/RtmpiWo9NT/R.INSTALL47c86a946472/tweenr/man/tween.Rd:107: file link 'approx' in package 'stats' does not exist and so has been treated as a topic
Rd warning: C:/Users/anders.swanson/AppData/Local/Temp/RtmpiWo9NT/R.INSTALL47c86a946472/tweenr/man/tween.Rd:108: file link 'approx' in package 'stats' does not exist and so has been treated as a topic
    tween_along                             html  
    tween_appear                            html  
    tween_at                                html  
    tween_components                        html  
    tween_elements                          html  
    tween_events                            html  
    tween_fill                              html  
    tween_state                             html  
    tween_states                            html  
    tweenr-package                          html  
Rd warning: C:/Users/anders.swanson/AppData/Local/Temp/RtmpiWo9NT/R.INSTALL47c86a946472/tweenr/man/tweenr-package.Rd:24: file link 'approx' in package 'stats' does not exist and so has been treated as a topic
*** copying figures
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (tweenr)
In R CMD INSTALL

@thomasp85
Copy link
Owner

thomasp85 commented Apr 11, 2019

I don’t understand why you can’t just update tweenr from CRAN?

@thomasp85
Copy link
Owner

I think you just need to restart your R session to fix this...

@dataders
Copy link

@thomasp85 sorry this dropped off my radar. You're right that installing tweenr and transformr from CRAN worked without issue.
My journey was:

  1. Get the same error as transition_time() gives this error: Error in transform_path(all_frames, states[[i]], ease, nframes[i], !!id, : transformr is required to tween paths and lines #190
  2. Follow the solution there to install from GitHub
  3. Get the new above error (because I hadn't restarted my session before loading the libraries)

Perhaps if there was a mention that tweenr and transformr are sometimes needed and should be downloaded from CRAN, people in the future won't be led astray by Google SEO and think installing from GitHub will fix their problems....

@harnagpal
Copy link

devtools::install_github('thomasp85/tweenr')
devtools::install_github('thomasp85/transformr')

@thomasp85
I tried all the steps. Few months back my gganimate pkg was working in my Rstudio. Now when ever I try, I get below message. I tried installing tweenr, transformr, again installed gganimate and gifski but nothing worked. I even tried running my code in a kaggle kernel. There I could not install gifski. I tweeted you also regarding this. Please help.

library(gganimate)
Error: package or namespace load failed for ‘gganimate’:
.onLoad failed in loadNamespace() for 'gganimate', details:
call: NULL
error: The png package is required to use gifski_renderer
In addition: Warning message:
package ‘gganimate’ was built under R version 3.6.2
library(gifski)
Warning message:
package ‘gifski’ was built under R version 3.6.2

@ScottDoGu
Copy link

what is the current state of gganimate? it is not loading in my rstudio slidy rmd programming and trying the other fixes has not been succesful:

i.e.: # + +attempt to install devtools and RCurl packages are not found!+ + #
library(devtools)
library(RCurl)
library(httr)

set_config( config( ssl_verifypeer = 0L ) )

devtools::install_github("RcppCore/Rcpp")

devtools::install_github("thomasp85/gganimate")

@thomasp85
Copy link
Owner

It's hard to say without any errors to go by? It seems you are trying to install the development version rather than release -- any reason for that?

@ScottDoGu
Copy link

there was a mistake in installing of packages syntax evidently. it is now resolved; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants