[contestms] Re: Issue with python+numpy and cms v1.2

  • From: Claudio Alvarez <calvarez1@xxxxxxxxxxx>
  • To: contestms@xxxxxxxxxxxxx
  • Date: Mon, 10 Apr 2017 16:11:37 -0300

Thank you Stefano. I am using Ubuntu Server 16.04 LTS, everything vanilla,
with no virtual environments for Python.
I will continue to tinker with this and see what happens. I will share my
solution if I manage to get numpy working.

------------------------------
*Claudio Alvarez Gómez, Ph.D.*
Profesor Asistente, Ciencias de la Computación
Facultad de Ingeniería y Ciencias Aplicadas
Universidad de los Andes
Av. Mons. Álvaro del Portillo 12.455
Las Condes, Santiago, Chile
Teléfono: +562 2618 1323
http://www.uandes.cl

On Sun, Apr 9, 2017 at 2:01 AM, Stefano Maggiolo <s.maggiolo@xxxxxxxxx>
wrote:

It works for me - maybe the reason is that you use a virtualenv for
running CMS, and you installed numpy only there? The libraries visibile to
the submission are those installed in the system, which might be a
different set than those available to CMS.

Another possibility is that your distribution requires a different
"allowed path". What distro are you using?

On 5 April 2017 at 19:18, Claudio Alvarez <calvarez1@xxxxxxxxxxx> wrote:

Hi all,

I just ran a contest in which Python was allowed, and a student of mine
submitted code that included numpy. Execution failed because Python was
unable to find numpy when running within isolate:

[stderr.txt]
Traceback (most recent call last):
  File "M2A1.py", line 7, in <module>
ImportError: No module named numpy

[submitted program]
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 04 15:33:22 2017

@author: lab108
"""
from numpy import math

-----

Compilation commands are as follows:
/usr/bin/python2 -m py_compile M2A1.py
/bin/mv M2A1.pyc M2A1

I have installed numpy and scipy in all servers with pip, however, I
still get the same error!
Is this error somehow related to the compilation command?

Thanks for any help.

Best,

------------------------------
*Claudio Alvarez Gómez, Ph.D.*
Profesor Asistente, Ciencias de la Computación
Facultad de Ingeniería y Ciencias Aplicadas
Universidad de los Andes
Av. Mons. Álvaro del Portillo 12.455
Las Condes, Santiago, Chile
Teléfono: +562 2618 1323
http://www.uandes.cl



Other related posts: