"jmvconnect must be installed"

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
donnek
Posts: 4
Joined: Thu Sep 09, 2021 12:37 pm

"jmvconnect must be installed"

Post by donnek »

I'm trying to use some R code in the Rj editor. I am using Ubuntu 20.04, R 4.1.1 (using the Michael Rutter repos), and Jamovi 2.0.1 (I think - see below). I have a large number of system R packages installed.

I have installed jmv 2.0, jmvconnect 2.0.0, jmvReadWrite 0.2.1, and jmvcore 1.8. The Rj module has been installed in Jamovi. If I start this, click the configuration cog, and select "system R" as the R Version, I get the message: "To use the system R from Jamovi, jmvconnect must be installed."

Code: Select all

installed.packages()['jmvconnect','LibPath']
says that jmvconnect is in

Code: Select all

/home/user/R/x86_64-pc-linux-gnu-library/4.1"
, the usual system dir for compiled packages (jmvconnect is not in the Rutter repos as yet).

Is there anything I can do to resolve this? My understanding is that Jamovi is built on top of R, so I'm not clear why it can't automatically see the system packages - is it because you're trying to simplify things for users by giving them a prepacked bundle of R packages so they don't have to actually install R if they don't want to?

I mentioned above that I'm not clear what version of Jamovi I'm using. This is because

Code: Select all

flatpak list
reports v1.6.19, but

Code: Select all

flatpak update org.jamovi.jamovi
reports "Nothing to do", suggesting I already have the latest v2.0.1, while Jamovi itself (bottom of the three dots pop-out panel) reports v2.0.0. Or does this mean that the Linux versions are lagging?
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: "jmvconnect must be installed"

Post by jonathon »

hey,

> My understanding is that Jamovi is built on top of R, so I'm not clear why it can't automatically see the system packages

the problem here is that the flatpak sandboxing on linux prevents jamovi from accessing the system R packages. there is a work around, but it's not terribly elegant.

if you run the following:

flatpak run org.jamovi.jamovi -R

you'll have access to R *inside* jamovi. you'll be able to install packages from within there.

cheers

jonathon
donnek
Posts: 4
Joined: Thu Sep 09, 2021 12:37 pm

Re: "jmvconnect must be installed"

Post by donnek »

Hi Jonathon

Thanks for this. But does this mean that I will then in effect have a complete parallel R installation inside the already ginormous Flatpak setup (some 8Gb already!). Not only would this be a waste of space, but I can see issues arising from things like differing package versions in the two R spaces.

I can see why you might want to use Flatpak for Linux, since presumably it's a relatively small % of your market, but it does have drawbacks like this that a proper .deb or .rpm package will not have.
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: "jmvconnect must be installed"

Post by jonathon »

inside the already ginormous Flatpak setup (some 8Gb already!)
8gb doesn't quite sound right. there must be something else going on there.
Not only would this be a waste of space, but I can see issues arising from things like differing package versions in the two R spaces.
yeah, i always recommend using the MRAN snapshots where specific versions are important.
I can see why you might want to use Flatpak for Linux, since presumably it's a relatively small % of your market, but it does have drawbacks like this that a proper .deb or .rpm package will not have.
yeah, we did used to ship .rpms, but the maintenance burden became too great.

cheers
donnek
Posts: 4
Joined: Thu Sep 09, 2021 12:37 pm

Re: "jmvconnect must be installed"

Post by donnek »

jonathon wrote:8gb doesn't quite sound right. there must be something else going on there.
Afraid not - it's because Flatpak uses multiple copies of runtime:
$ du -sh /var/lib/flatpak/*
1.9G /var/lib/flatpak/app
42M /var/lib/flatpak/appstream
196K /var/lib/flatpak/exports
3.0G /var/lib/flatpak/repo
991M /var/lib/flatpak/runtime
This is a bit less (6Gb+) than the GUI interfaces like Filelight give (8Gb), but not much, and it's still an insane figure. I had to symlink /var/lib/flatpak to a user dir with more space, because it was eating up my root dir.

It's a known issue with Flatpak (and probably Snap for that matter), eg:
https://askubuntu.com/questions/1106040 ... nload-size
https://github.com/flatpak/flatpak/issues/2147
jonathon wrote:yeah, we did used to ship .rpms, but the maintenance burden became too great.
One option might be to ensure that the Windows version runs on WINE (as, for instance, the audio software Reaper does - https://www.cockos.com/reaper). I tried installing the Windows version, which went fine, but alas, launching involved 5 minutes of nothing except wheel-spinning ... :-(

So at present the position would seem to be that the Linux version of Jamovi can't really access System R. I suppose in that case the thing would be to take the generated Jamovi code and run it separately in R if that is required.
Post Reply