AttributeError: module 'numpy' has no attribute '__version__'

AttributeError: module 'numpy' has no attribute '__version__'

attributeerror: 'module' object has no attribute unittest
attributeerror: 'module' object has no attribute python_implementation
attributeerror: 'module' object has no attribute process
attributeerror: module 'imagezmq' has no attribute 'imagehub'
attributeerror: 'module' object has no attribute 'version
attributeerror: 'module' object has no attribute 'modules
attributeerror: 'module' object has no attribute 'series
attributeerror: 'module has no attribute django

I updated my computer today, and am getting the following error message when I attempt to import pandas:

import pandas as pd        
AttributeError: module 'numpy' has no attribute '__version__'

I have tried the suggestions from the following links:

  1. AttributeError: 'module' object has no attribute '__version__'
  2. AttributeError: 'module' object has no attribute '__version__'

I do not have any files names numpy.py other than the numpy package.

I am running anaconda2 within windows 10, and have created a python 3.5 virtual environment.

Following is the full error message:

Python 3.5.5 | packaged by conda-forge | (default, Apr  6 2018, 16:03:44) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\j267156\AppData\Local\Continuum\anaconda2\envs\sf35\lib\site-packages\pandas\__init__.py", line 23, in <module>
    from pandas.compat.numpy import *
  File "C:\Users\j267156\AppData\Local\Continuum\anaconda2\envs\sf35\lib\site-packages\pandas\compat\numpy\__init__.py", line 10, in <module>
    _np_version = np.__version__
AttributeError: module 'numpy' has no attribute '__version__'

Edit: performing the following commands gives an error

import numpy
print(numpy.__file__)
AttributeError: module 'numpy' has no attribute '__file__'
print(numpy.version.version)
AttributeError: module 'numpy' has no attribute 'version'

Edit2: perfoming the following commands gives me the following errors:

import numpy as np
np.zeros(5)
#AttributeError: module 'numpy' has no attribute 'zeros'
vars(np).keys()
#dict_keys(['__name__', '__package__', '__spec__', '__loader__', '__doc__', '__path__'])

Edit3: the following commands result in the following output:

import numpy as np    
In [7]: np.__path__
    Out[7]: _NamespacePath(['C:\\Users\\j267156\\AppData\\Local\\Continuum\\anaconda2\\envs\\sf35\\lib\\site-packages\\numpy'])

    In [8]: np.__loader__
    Out[8]: <_frozen_importlib_external._NamespaceLoader at 0x2033a3c8080>

Try this

In Jupyter notebook first uninstall the existing numpy by using !pip uninstall numpy.

Then install it !pip install numpy. Now restart the kernel(Python Notebook). It will work.

Python AttributeError: 'module' object has no attribute 'Serial', You're importing the module, not the class. So, you must write: from serial import Serial. You need to install serial module correctly: pip install  @desertnaut frankly, this question is 2 months old and I forgot it long time ago :). Sometimes I visit so many questions that I don't remeber questions from previous hour :) – furas 2 days ago


Just had this issue after conda chose to update numpy from 1.13.3 to 1.14.3. Reverting numpy via procedure in http://blog.rtwilson.com/conda-revisions-letting-you-rollback-to-a-previous-version-of-your-environment/ sufficed to recover functionality, followed by pinning the version in the environment.

What is the reason for the AttributeError: 'module' object has no , What is the reason for the AttributeError: 'module' object has no attribute '​check_output', in Python? Ad by DuckDuckGo. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! But avoid …. Asking for help, clarification, or responding to other answers.


You may have named your program/script 'numpy'. I also had that then i renamed my program and then it works. It happens because when you name your program similar to a module the import attribute clashes between programs and modules

AttributeError: module 'object' has no attribute 'foobar', AttributeError: module 'object' has no attribute 'foobar'. python; shadowing; modules; exceptions. I have a script named requests.py which has the following code  AttributeError: module 'tensorflow' has no attribute 'enable_eager_execution' my tensorflow version is 2.0. The image shows my tensorflow version. can anyone tell me why am I getting this Thanks in advance


Debugging AttributeError: 'module' object has no attribute 'Parameter', This may not be the cause for everyone, but I've identified at least one set of triggers. Run Python toolbox tool from ArcCatalog; Geoprocessing history is on and  Recent in Python. How to create new environment using conda? 21 hours ago How can I define a function that takes a list of first names and a list of last names, and returns a list of the corresponding full names where the last name is initialized 1 day ago


AttributeError: 'module' object has no attribute 'Connection' · Issue , Connection(**app.config.get('MONGODB_CONFIG', {})) AttributeError: 'module' object has no attribute 'Connection'. I am from Node.js env, so dont know much  AttributeError: module tensorflow has no attribute contrib #7767. Closed Girish1127 opened this issue Nov 6, 2019 · 5 comments Closed


AttributeError: 'module' object has no attribute 'ConnectivityState , Hello,someone. I'm using Linux ubuntu16.04,which python version is 3.5.When i run example/helloworld/greet_server.py in pycharm,it raises  AttributeError: module 'matplotlib' has no attribute 'plot' Calling a function of a module by using its name (a string) nx.draw_networkx shows module