facebookincubator / GeoLift

GeoLift is an end-to-end geo-experimental methodology based on Synthetic Control Methods used to measure the true incremental effect (Lift) of ad campaign.
https://facebookincubator.github.io/GeoLift/
MIT License
175 stars 54 forks source link

Error when installing packages #156

Closed ffionwells closed 1 year ago

ffionwells commented 1 year ago

Bug description

When trying to install the new prerequisite packages for running GeoLift I am getting the following errors: ERROR: configuration failed for package ‘units’ & ERROR: dependency ‘CommutingZones’ is not available for package ‘GeoLift’ This is causing the install to fail which is then giving the further error Error in library(GeoLift) : there is no package called ‘GeoLift’ when trying to import the GeoLift package.

Session information

Please paste the output after running sessionInfo() in your R session.

Reproduction steps

install.packages("remotes", repos='http://cran.us.r-project.org') remotes::install_github("facebookincubator/CommutingZones") remotes::install_github("ebenmichael/augsynth")

library(GeoLift)

gufengzhou commented 1 year ago

I've just removed and reinstalled using the following code. It works.

remotes::install_github("facebookincubator/CommutingZones")
remotes::install_github("ebenmichael/augsynth")
remotes::install_github("facebookincubator/GeoLift")

You can't call a library using library() if it's not yet installed.

ffionwells commented 1 year ago

^ just tried this and it doesn't work for me, getting ERROR: dependency ‘CommutingZones’ is not available for package ‘GeoLift’

gufengzhou commented 1 year ago

What error do you get when installing commutingzones?

ffionwells commented 1 year ago

I get these three errors ERROR: configuration failed for package ‘units’ ERROR: dependency ‘units’ is not available for package ‘sf’ ERROR: dependency ‘sf’ is not available for package ‘CommutingZones’

gufengzhou commented 1 year ago

@mdb374 FYI can you please check this? Thanks!

ffionwells commented 1 year ago

@gufengzhou @mdb374 are there any updates on this?

tellis92 commented 1 year ago

Hi, I work with @ffionwells and had a look at this and think I've identified the issue. They are trying to install on to a databricks notebook and the requirement for CommutingZones has introduced a requirement for units - this package requires the linux package libudunits2-dev which wasn't installed on the databricks cluster (See here)

Is it worth updating the documentation to specify you may need to install libudunits2-dev first (i.e. run something like sudo apt install libudunits2-dev)?

gufengzhou commented 1 year ago

Hi both, thanks for the insights. We've failed to reproduce this error and could only google the error message. Glad that it's working now. We'll update the documentation accordingly

FYI @JussanN @raphaeltamaki @mdb374

JussanN commented 1 year ago

Hi, I'm closing this issue as it was already solved. FYI it's no longer required to install CommutingZones when installing GeoLift so the first remains optional. You can see more details on the GeoLift website. Thank you. https://facebookincubator.github.io/GeoLift/docs/GettingStarted/InstallingR