Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm trying to import an image in Mathematica on my Raspberry Pi.

The code is simple but I get an error when importing:

$ wolfram
Wolfram Language (Raspberry Pi Pilot Release)
Copyright 1988-2014 Wolfram Research
Information & help: wolfram.com/raspi

In[1]:= SetDirectory["~/"];

In[2]:= i=Import["small.jpg"];
InstallJava::fail: A link to the Java runtime could not be established.

This is the image I'm trying to import: http://i.stack.imgur.com/zzSLr.jpg It's 1.5 MB large so the Pi should have no problem importing it. Why do I get this error and how can I prevent it?


UPDATE: I believe this is caused when the computer is running out of memory. I don't know a sure way to reproduce it but it keeps happening if I do other memory-intensive tasks on my Raspberry Pi. I'd like to know if there's a way to prevent this.

and I got this error:

/opt/Wolfram/WolframEngine/10.0/SystemFiles/Kernel/Binaries/Linux-ARM/WolframKernel: error while loading shared libraries: /opt/Wolfram/WolframEngine/10.0/SystemFiles/Libraries/Linux-ARM/libWolframEngine.so: cannot make segment writable for relocation: Cannot allocate memory

share|improve this question
    
I don't have a Raspberry Pi so I can't reproduce this, but I presume you do actually have the JRE or JDK installed and usable...? –  Oleksandr R. Apr 26 at 12:46
    
I cannot reproduce this problem with either the November 19, 2013 version or the January 29, 2014 version. –  bobthechemist Apr 26 at 13:10
    
It seems imgur compressed the image, here is one uncompressed similar image: dropbox.com/s/v3hp98lgf31hm0r/small.jpg The problem is that sometimes I can import images just fine, but other times I get this error until I restart the Pi. –  shrx Apr 26 at 14:20
    
@shrx are you able to reproduce this problem with the most recent version of MMA on the RPi? –  bobthechemist Nov 11 at 3:22
    
@bobthechemist will test when I have the time, but my Pi occasionally still has problems with Mathematica, causing unresponsiveness and reboots. –  shrx Nov 11 at 8:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.