2

I am having problems with the Numpy 1.18.5 version. I have the Python3.8 and they seem to be incompatible. I am working with Anaconda Navigator. So sorry if this is very basic but i am a beginner in this amazing world. Thanks a lot in advance. This is the message error i get:

$ python Bikeshare.py
C:\Users\Xabi\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "Bikeshare.py", line 2, in <module>
    import pandas as pd
  File "C:\Users\Xabi\anaconda3\lib\site-packages\pandas\__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.8 from "C:\Users\Xabi\anaconda3\python.exe"
  * The NumPy version is: "1.18.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: Das angegebene Modul wurde nicht gefunden. 
Stefan
  • 1,697
  • 15
  • 31
Xabi
  • 23
  • 1
  • 4
  • Did you follow the instructions in the error message? That's a very common error message, too, have you done any research? – AMC Oct 26 '20 at 00:34
  • Does this answer your question? [numpy is already installed with Anaconda but I get an ImportError (DLL load failed: The specified module could not be found)](https://stackoverflow.com/questions/54063285/numpy-is-already-installed-with-anaconda-but-i-get-an-importerror-dll-load-fail) – AMC Oct 26 '20 at 00:34

2 Answers2

3

You missed to activate the conda environment, hence the error. Try

C:\> conda activate
(Anaconda3) C:\> python Bikeshare.py

If activation doesn't work, your install is incomplete. Try

C:\> conda init

first.

Peter
  • 10,959
  • 2
  • 30
  • 47
0

I can see the error accures when the script imports Pandas. So you might need to change your pandas version too.

To check your Numpy: Try to find your NumPy version first.

import numpy as np
print(np.__version__)
1.18.5

If it's not the version you're looking for, uninstall the current version and install the specified version:

pip uninstall numpy
pip install numpy==1.18.5

I am not sure if it's a good idea or not but I always use python's two previous version to make sure all my dependencies are all met. Since Python 3.9 is available I use python 3.7

MSH
  • 1,743
  • 2
  • 14
  • 22