Running Pandas (Python3) with Jobe

Running Pandas (Python3) with Jobe

by Joel Raucq -
Number of replies: 2

Hi,

I have been using CodeRunner and a JOBE server for several months without any problem at all. I recently created a few exercises in Moodle using Numpy and Pandas. I was able to use Numpy without problem, as usual. But when I tried to import Pandas, the JOBE server returned an error when importing the package: 

ImportError: /usr/local/lib/python3.6/dist-packages/pandas/_libs/join.cpython-36m-x86_64-linux-gnu.so: failed to map segment from shared object

When I logged into my JOBE server through SSH, call python3 and import Pandas from the interpreter, it works without any problem. I use Ubuntu and I installed Pandas using pip3. I enabled the logs but it didn't show any error... 

I saw in this forum a similar issue from another person who was unsuccessful importing Numpy but I couldn't find a solution to my problem.

Any help would be welcome!

Thank you.

In reply to Joel Raucq

Re: Running Pandas (Python3) with Jobe

by Richard Lobb -

This is probably an out-of-memory error. To check if that's the case, click the Customise checkbox, open the Advanced Customisation panel, and set the Mem Limit (MB) field to 0. That turns off the memory checking altogether - not a good long term strategy but a simple first check. If the question then runs OK I suggest exploring a bit to find how much memory you actually need. Then allow, say, 1.5 times that much.

I recommend you set up your own question prototype e.g. python3_plus_pandas with the larger memory limit  and make sure all your questions are of that type rather than the basic python3. You don't want to be customising every single question you write.

Richard

In reply to Richard Lobb

Re: Running Pandas (Python3) with Jobe

by Joel Raucq -

Hi Richard.

You were spot on: this was the issue. 

Thank you so much for your answer and for CodeRunner, it's really adding a lot of value to Moodle.

Joël.