Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google foo.bar Challenge Issue: Can't import libraries

Tags:

python

numpy

I am working on a problem (doomsday_fuel) using python and I need to use matrices, so I would like to import numpy. I have solved the problem and it runs perfectly on my own computer, but Google returns the error: ImportError: No module named numpy [line 3].

The beginning of my code looks like:

import fractions from fractions import Fraction import numpy as np

I have checked constraints.txt and they do not seem to restrict numpy

"Your code will run inside a Python 2.7.6 sandbox. Standard libraries are supported except for bz2, crypt, fcntl, mmap, pwd, pyexpat, select, signal, termios, thread, time, unicodedata, zipimport, zlib."

Does anyone have any ideas how or why this would happen? Or do people have ideas as to what steps I could take to ask Google about this?

like image 391
jasonx Avatar asked Feb 05 '23 11:02

jasonx


1 Answers

Unfortunately numpy is not a standard library in python 2.7, and is not supported by foobar. For a complete list of available modules, I suggest looking here: https://docs.python.org/2/library/

like image 131
Dylan O'Ceallaigh Avatar answered Feb 07 '23 01:02

Dylan O'Ceallaigh