Closed serge2016 closed 11 months ago
Is this the most recent crisprScore (1.4 release, 1.5 devel)?
I thought that the latest version was no longer using reticulate to load Python2 environments.
I have tried both the release and the latest master
Oh wait, I see you're actually calling basiliskStart(env_azimuth)
. You shouldn't be doing that; from the output, you can see that reticulate's support for Python 2 is on its last legs. Instead, getAzimuthScores
just uses the Conda environment's Python directly.
Incidentally, @Jfortin1 it may be safer to be more explicit about the Python used in
e.g., with the full path via basilisk.utils:::getPythonBinary(env)
.
According to this repo, the crisprScore's release is 1.1.17. Master branch is newer, that's why I have tested it too.
With basiliskStart(env_azimuth)
I simply try to install all needed environment. I am creating a docker image and want all installation to be done during build step for not to wait for the environment installation every run.
When I ran the same commands in the beginning of 2023 year, everything worked. I suppose the problem is in https://github.com/crisprVerse/crisprScore/blob/master/R/basilisk.R#L184 or https://github.com/crisprVerse/crisprScore/blob/master/R/basilisk.R#L1
To install up-front, you should set the BASILISK_USE_SYSTEM_DIR
environment variable, as documented here.
Behavior at the start of the year doesn't really mean much, given reticulate has updated a few times since then (possibly dropping Python 2 support along the way) and conda itself seems to rebuild its binaries every now and then.
FIxed now in v1.5.1
If I use BASILISK_USE_SYSTEM_DIR=1
, problem looks different:
> library(basilisk); source('R/basilisk.R'); basiliskStart(env_azimuth)
#44 1.672 Error in obtainEnvironmentPath(env) :
#44 1.672 environment 'azimuth_basilisk' should have been created during 'crisprScore' installation
#44 1.672 Calls: basiliskStart -> obtainEnvironmentPath
#44 1.672 Execution halted
> library(basilisk); source('R/basilisk.R'); obtainEnvironmentPath(env_azimuth)
Error in obtainEnvironmentPath(env_azimuth) :
environment 'azimuth_basilisk' should have been created during 'crisprScore' installation
Execution halted
I don't know how you're setting up your Dockerfile
but you need to set this variable before installation of basilisk and crisprScore.
Thank you! Now I understood, that I should set ENV VAR BASILISK_USE_SYSTEM_DIR=1
before installing basilisk
:
R -e "remotes::install_github('LTLA/basilisk', ref='master'); remotes::install_github('LTLA/basilisk.utils', ref='master')"
!
After this I should install crisprVerse
:
R -e "remotes::install_github('crisprVerse/crisprBase', ref='master'); remotes::install_github('crisprVerse/crisprBowtie', ref='master'); remotes::install_github('crisprVerse/crisprScoreData', ref='master'); remotes::install_github('crisprVerse/crisprBwa', ref='master'); remotes::install_github('crisprVerse/crisprDesign', ref='master'); remotes::install_github('crisprVerse/crisprDesignData', ref='master'); remotes::install_github('crisprVerse/crisprViz', ref='master'); remotes::install_github('crisprVerse/crisprVerse', ref='main'); remotes::install_github('crisprVerse/crisprScore', ref='master')"
.
And finally I should NOT run cd "$SOFT/crisprScore" && R -e "library(basilisk); source('R/basilisk.R'); basiliskStart(env_azimuth)"
, it is not necessary (and fails with error).
Thank you! It works!
Hello!
Thank you for this package! Could you help me, please, to fix this with new versions of Ubuntu 22.04?
Maybe this is a reason: https://foss.heptapod.net/pypy/pypy/-/issues/3173#note_160826 ?
I suppose, that some versions should be updated maybe here: https://github.com/crisprVerse/crisprScore/blob/master/R/basilisk.R#L1