I recently downloded Tensorflow, but I wasn’t able to install it properly. I have deleted it and used >pip uninstall tensorflow.
Now I want to run some of my notebooks but I get an error: Original error was: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath' (C:\Users\Brenda\anaconda3\lib\site-packages\numpy\core_multiarray_umath.cp37-win_amd64.pyd)
As was suggested by When importing tensorflow, I get the following error: No module named 'numpy.core._multiarray_umath' , I uninstalled Numpy and re-installed it (I tried both pip install numpy –upgrade and pip install numpy). The error doesn’t disappear.
Update on what I have tried
This is what I tried in my windows commandprompt
• pip install -U numpy
--> Requirement already up-to-date: numpy in c:\users\brenda\anaconda3\lib\site-packages (1.19.1)
• C:\Users\Brenda>import numpy;print numpy.__version__;print numpy.__file__
--> 'import' is not recognized as an internal or external command,operable program or batch file.
• C:\Users\Brenda>numpy.__version__
--> 'numpy.__version__' is not recognized as an internal or external command,operable program or batch file.
• pip install numpy==1.8
--> Not usefull since I’m on version 1.9
• C:\Users\Brenda>sudo pip install numpy --upgrade --ignore-installed
--> 'sudo' is not recognized as an internal or external command, operable program or batch file.
• C:\Users\Brenda>pip install -U numpy
--> Requirement already up-to-date: numpy in c:\users\brenda\anaconda3\lib\site-packages (1.19.1)
• C:\Users\Brenda>pip install --target c:\users\brenda\anaconda3\lib\site-packages
--> ERROR: You must give at least one requirement to install (see "pip help install")
• C:\Users\Brenda>pip uninstall numpy
--> Successfully uninstalled numpy-1.19.1
C:\Users\Brenda>pip uninstall numpy
WARNING: Skipping numpy as it is not installed.
• Typing pip list in Jupyter
--> Numpy 1.19.1
My versions are:
- Python3.7.6
- The NumPy version is: "1.19.1"
I’m pretty sure the installation of Tensorflow caused my problems.
I’m happy to go without Tensorflow, I just need Numpy to work again. Please help me fix this.
My full path:
PATH: C:\Users\Brenda\anaconda3;C:\Users\Brenda\anaconda3\Library\mingw-w64\bin;C:\Users\Brenda\anaconda3\Library\usr\bin;C:\Users\Brenda\anaconda3\Library\bin;C:\Users\Brenda\anaconda3\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Python38\Scripts;C:\Users\Brenda\anaconda3;C:\Users\Brenda\anaconda3\Library\mingw-w64\bin;C:\Users\Brenda\anaconda3\Library\usr\bin;C:\Users\Brenda\anaconda3\Library\bin;C:\Users\Brenda\anaconda3\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Python38\Scripts;C:\Users\Brenda\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Python38|Scripts;C:\Users\Brenda\anaconda3\lib\site-packages\numpy\.libs
Full traceback:
ImportError Traceback (most recent call last)
~\anaconda3\lib\site-packages\numpy\core\__init__.py in <module>
21 try:
---> 22 from . import multiarray
23 except ImportError as exc:
~\anaconda3\lib\site-packages\numpy\core\multiarray.py in <module>
17 # _get_ndarray_c_version is semi-public, on purpose not added to __all__
---> 18 from ._multiarray_umath import (
19 _fastCopyAndTranspose, _flagdict, _insert, _reconstruct, _vec_string,
ImportError: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath' (C:\Users\Brenda\anaconda3\lib\site-packages\numpy\core\_multiarray_umath.cp37-win_amd64.pyd)
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-12-6b8d439c54e0> in <module>
----> 1 import numpy as np
2 import pandas as pd
3 import matplotlib.pyplot as plt
4 get_ipython().run_line_magic('matplotlib', 'inline')
5 import seaborn as sns
~\anaconda3\lib\site-packages\numpy\__init__.py in <module>
138 from . import _distributor_init
139
--> 140 from . import core
141 from .core import *
142 from . import compat
~\anaconda3\lib\site-packages\numpy\core\__init__.py in <module>
46 """ % (sys.version_info[0], sys.version_info[1], sys.executable,
47 __version__, exc)
---> 48 raise ImportError(msg)
49 finally:
50 for envkey in env_added:
ImportError:
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.7 from "C:\Users\Brenda\anaconda3\python.exe"
* The NumPy version is: "1.19.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: cannot import name '_set_madvise_hugepage' from 'numpy.core._multiarray_umath' (C:\Users\Brenda\anaconda3\lib\site-packages\numpy\core\_multiarray_umath.cp37-win_amd64.pyd)