I'm using a conda env as python interpreter and I've all the necessary packages installed
But when I run the file, I get this error
Traceback (most recent call last):
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\core\__init__.py", line 16,
in <module>
from . import multiarray
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Programming Projects/python projects/MaskRCNN/src/test_tf.py", line 8
, in <module>
import numpy as np
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\__init__.py", line 142, in
<module>
from . import add_newdocs
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\add_newdocs.py", line 13, i
n <module>
from numpy.lib import add_newdoc
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\lib\__init__.py", line 8, i
n <module>
from .type_check import *
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\lib\type_check.py", line 11
, in <module>
import numpy.core.numeric as _nx
File "D:\Anaconda3\envs\tf\lib\site-packages\numpy\core\__init__.py", line 26,
in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
Process finished with exit code 1
But when I run it from the terminal, it works just fine
Does anyone have any clue on what might be a fix?
It is a known issue, should be fixed in 2019.1 EAP. Could you please update and check?
Related
I am using the Anaconda distribution with Python 3.9. Among the packages installed, I have numpy, pandas, etc. In PyCharm IDE, I have set the Project Interpreter to be the path to the python.exe installed with Anaconda: C:\Users\nguye\anaconda3\envs[Tensorflow]\pythonw.exe
P.S: I have tried every method to fix this problem on stack overflow from including more paths to uninstall and reinstall but none of those work. Please help!
C:\Users\nguye\anaconda3\envs\[Tensorflow]\pythonw.exe C:/Users/nguye/PycharmProjects/tensorEnv/main.py
Traceback (most recent call last):
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\numpy\core\__init__.py", line 23, in <module>
from . import multiarray
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\numpy\core\multiarray.py", line 10, in <module>
from . import overrides
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\numpy\core\overrides.py", line 6, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\nguye\PycharmProjects\tensorEnv\main.py", line 3, in <module>
import tensorflow
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\tensorflow\python\__init__.py", line 37, in <module>
from tensorflow.python.eager import context
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\tensorflow\python\eager\context.py", line 26, in <module>
import numpy as np
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\numpy\__init__.py", line 144, in <module>
from . import core
File "C:\Users\nguye\anaconda3\envs\[Tensorflow]\lib\site-packages\numpy\core\__init__.py", line 49, in <module>
raise ImportError(msg)
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.9 from "C:\Users\nguye\anaconda3\envs\[Tensorflow]\pythonw.exe"
* The NumPy version is: "1.22.2"
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: The specified module could not be found.
Process finished with exit code 1
I have installed Python 3.7, and I have been working in Python for a while. It was working all fine and suddenly from this afternoon, I am unable to load any Python libraries. I have tried to uninstall and install entire libraries and Python itself. It has not fixed the issue yet. Could someone help on what else to be looked at. I have been using pip3 to install packages. I am not using Anaconda. I was able to install the package successfully but unable to load for some reason. When I try to load numpy, I am getting below mentioned error
import numpy
Traceback (most recent call last):
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: The network path was not found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\chango3\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The network path was not found.
Any help would be appreciated
I am trying to get arcpy to import in the vs code terminal (running python 2.7 as an arcgis install). It runs fine if I open a command window, initiate python, and import arcpy. It also works within the ArcGIS environment. This leads me to beloeve that the error below is inaccurate. Importing arcpy does not work at the VS Code terminal. How can I resolve this?
>>> import arcpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.6\ArcPy\arcpy\__init__.py", line 20, in <module>
import numpy
File "C:\Python27\ArcGIS10.6\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Python27\ArcGIS10.6\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Python27\ArcGIS10.6\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Python27\ArcGIS10.6\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Python27\ArcGIS10.6\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified path is invalid.
I have a Python script which I want to start from cmd because I'm going to call it in a C# script.
The problem is, the code works fine in the IDE and when I call it from the Anaconda script but not when I call it from the regular cmd.
I'm calling the script with the following line:
$ python c:/Users/myname/pycharmProjects/testing/main.py
I get the following error message:
Traceback (most recent call last):
File "c:/Users/myname/pycharmProjects/testing/main.py", line 1, in <module>
import process
File "/cygdrive/c/Users/myname/pycharmProjects/testing/process.py", line 4, in <module>
import numpy as np
File "/cygdrive/c/Users/myname/pycharmProjects/testing/numpy/__init__.py", lin e 142, in <module>
from . import add_newdocs
File "/cygdrive/c/Users/myname/pycharmProjects/testing/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/cygdrive/c/Users/myname/pycharmProjects/testing/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/cygdrive/c/Users/myname/pycharmProjects/testing/numpy/lib/type_check.py ", line 11, in <module>
import numpy.core.numeric as _nx
File "/cygdrive/c/Users/myname/pycharmProjects/testing/numpy/core/__init__.py" , line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: cannot import name multiarray
I have uninstalled and reinstalled numpy, but the error is still the same. I'm really confused why I it works via the Anaconda prompt, but not the cmd as I did set the PATH variable.
Any help is appreciated!
I try to run import numpy on my machine. but after do it take an error like this:
$ python -c "import numpy"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/usr/local/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/usr/local/lib/python2.7/dist-packages/numpy/core/__init__.py", line 24, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
The error is about numpy! i try to check numpy by excute this command
$apt-cache policy python-numpy
python-numpy:
Installed: 1:1.11.0-1ubuntu1
Candidate: 1:1.11.0-1ubuntu1
Version table:
*** 1:1.11.0-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
this show that numpy install in my machine in correct state.
i uninstalled numpy and all of my python dependency in my machine and install it again.
but problem is exist. i cant find what is the problem?