Git Product home page Git Product logo

Comments (4)

renan-r-santos avatar renan-r-santos commented on May 16, 2024

Hi @roaldarbol, thanks for the issue report.
The mybinder demo works fine for me using the Pixi - R kernel, so even though I don't know much about R, I believe either you have a global installation of R that's interfering with the kernel or adding r-irkernel and r-base to the Jupyter environment is also interfering.

Note that you don't need to install r-irkernel and r-base with pixi-kernel but you do need to create a new pixi project inside JupyterLab and add i-irkernel there, see the quick start docs.

Nonetheless, those other R installations weren't supposed to break the Pixi - R kernel, so I'm proposing a fix at #16. Would you be able to try it, by cloning, checking out the branch and doing an editable install? I've had a few problems with editable installs though, so you might need to delete the rattler cache at ~/.cache/rattler/cache and .pixi and pixi.lock folders and file.

The fix sets R_LIBS, R_LIBS_SITE and R_LIBS_USER to the path of the Pixi manifest file that is running the Pixi - R kernel, so I believe this should be a robust solution regardless of other R installations, see IRkernel/IRkernel#583 (comment).

from pixi-kernel.

roaldarbol avatar roaldarbol commented on May 16, 2024

Note that you don't need to install r-irkernel and r-base with pixi-kernel but you do need to create a new pixi project inside JupyterLab and add i-irkernel there, see the quick start docs.

Ah, I may be confused here. Do I need to add r-irkernel within Jupyter? Can't it be done from in the pixi project before opening Jupyter Lab?

I should not be having an interfering R installation, but it generally points to the global library rather than the project-based one - so it will not be picking up the pixi-installed libraries by default. So I think your patch should work - I've had the exact same issues trying to install R packages from conda-forge within a pixi project - as an aside, I've created an R package, https://github.com/roaldarbol/r-pixi, that allows installing R packages within R using pixi (which is the normal R workflow) to circumvent those issues for regular users.
I won't be able to test out your patch today, but can maybe have a stab at it tomorrow.

from pixi-kernel.

renan-r-santos avatar renan-r-santos commented on May 16, 2024

I published a new release 0.2.1 with the changes to R environment variables. It is on PyPI and soon on conda-forge. It would be awesome if you could try it. Thanks.

from pixi-kernel.

roaldarbol avatar roaldarbol commented on May 16, 2024

Works beautifully! Well done!

from pixi-kernel.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.