1

While importing pandas I am getting below error:

>>> import pandas as pd
**RuntimeError: module compiled against API version 6 but this version of numpy is 4**
numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/pandas/__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: numpy.core.multiarray failed to import

Tried to upgrade numpy module to the latest version. Getting below message:

[abc]# yum install numpy

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
**Package numpy-1.4.1-9.el6.x86_64 already installed and latest version**

Is there any manual work around to resolve this problem?

KillerX
  • 1,436
  • 1
  • 15
  • 23
  • Please familiarize yourself with how to format text snippets/code in your question. It will make it a lot easier for anyone who is trying to help to read and see what is going on. – KillerX Nov 10 '17 at 14:31
  • Please format your question or review the edits made by others if you want to get help. – WiLL_K Nov 10 '17 at 14:47

1 Answers1

0

Well the module's answer to your import request seems to be pretty self-explaining. Did you try a

yum update numpy

If that doesn't fix your problem (I don't know what repos your centos distro uses) you could always try the pip approach

pip install -U numpy 

If that still doesnt solve your problem, you might have several versions of numpy installed and your should try the answers to this question.

BoboDarph
  • 2,751
  • 1
  • 10
  • 15