Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Can't import numpy in Python 3.6.0 #367

Closed
error256 opened this issue Apr 5, 2017 · 4 comments
Closed

Can't import numpy in Python 3.6.0 #367

error256 opened this issue Apr 5, 2017 · 4 comments

Comments

@error256
Copy link

error256 commented Apr 5, 2017

https://www.codewars.com/kumite/58e4b96a823ffd23db00007c?sel=58e4b96a823ffd23db00007c

import numpy
Traceback:
   in 
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 153, in 
    from . import add_newdocs
  File "/usr/lib/python3/dist-packages/numpy/add_newdocs.py", line 13, in 
    from numpy.lib import add_newdoc
  File "/usr/lib/python3/dist-packages/numpy/lib/__init__.py", line 8, in 
    from .type_check import *
  File "/usr/lib/python3/dist-packages/numpy/lib/type_check.py", line 11, in 
    import numpy.core.numeric as _nx
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 6, in 
    from . import multiarray
ImportError: cannot import name 'multiarray'
@kazk
Copy link
Member

kazk commented Apr 5, 2017

numpy is installed with:

# Install Python3 libraries
RUN apt-get install -y python3-numpy python3-scipy python3-pandas

and the version is 1.8.1 (2014-03-25) according to http://packages.ubuntu.com/trusty/python3-numpy.


Maybe creating isolated environments for each Python version using virtualenv will work for now.
Ideally, we should have independent images, codewars/python-runner:{python-version}, as I proposed before, but it's not easy to transition.

@kazk
Copy link
Member

kazk commented Apr 4, 2018

Fixed in codewars/codewars.com#1336

@kazk kazk closed this as completed Apr 4, 2018
@begueradj
Copy link

Well, I am facing the same issue and this is not fixed in the link you shared.

@kazk
Copy link
Member

kazk commented May 30, 2018

@begueradj

not fixed in the link you shared

Do you mean https://www.codewars.com/kumite/58e4b96a823ffd23db00007c?sel=58e4b96a823ffd23db00007c ? That's just showing the output when that was created. You shouldn't see the error if you run it after forking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants