Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DLL load failed
#1
I have successfully ran:
pip install --upgrade matplotlib
and then I wrote in my simple Python program:
from matplotlib import pyplot
I got:
DLL load failed: The specified module could not be found.
Stack trace:
> File "D:\tempx\pythonapplication1\<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
> File "D:\tempx\pythonapplication1\<frozen importlib._bootstrap_external>", line 678, in exec_module
> File "D:\tempx\pythonapplication1\<frozen importlib._bootstrap>", line 665, in _load_unlocked
> File "D:\tempx\pythonapplication1\<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
> File "D:\tempx\pythonapplication1\<frozen importlib._bootstrap>", line 971, in _find_and_load
> File "D:\Tempx\pythonapplication1\pythonapplication1.py", line 4, in <module>
> from matplotlib import pyplot
Loaded '__main__'

What I have done wrong ?

I'm sorry for these simple questions, but I am stuck here and I don't know how to overcome this error .... I don't see what I am doing wrong ...

Thank you for every hint/help hand,
Reply
#2
I am skeptical about your setup based on previous Thread.
There it looked like you did run Anaconda in a virtual environment or maybe Docker,as it did install Linux wheel on Windows.
flaviu2 Wrote:/srv/conda/envs/notebook/lib/python3.6/site-packages (from opencv-python) (1.19.1)
Do you know how this stuff work or are you on thin ice?
Reply
#3
Thank you for your time and interest. It means a lot for me.

I only try to run this tutorial: https://www.codeproject.com/Articles/527...-to-OpenCV

So, I have tried on Win10, and I used PIP from Python default installer. This one: https://ibb.co/RPV6Wkx

I have to mention that I ran successfully:
pip install --upgrade opencv-python
and
pip install --upgrade matplotlib

However, I got those errors ... I am running in out of ideas, I didn't used Python by now.
Reply
#4
(Sep-30-2020, 08:35 AM)flaviu2 Wrote: So, I have tried on Win10, and I used PIP from Python default installer. This one: https://ibb.co/RPV6Wkx
Yes,but that's not the version you have used or install to.
This is own version that's use virtual environment envs that you have install to.
flaviu2 Wrote:/srv/conda/envs/notebook/lib/python3.6/site-packages (from opencv-python) (1.19.1)
Look at this again Python 3.8 (3.6-3.7) and pip installation under Windows
Open cmd(tutorial) and type this:
C:\Users\Tom>cd..
C:\Users>cd ..

# Python version
C:\>python -V
Python 3.8.3

# Placement of Python version
C:\>python -c "import sys; print(sys.executable)"
C:\python38\python.exe

# Test pip 
C:\>pip -V
pip 20.2.3 from c:\python38\lib\site-packages\pip (python 3.8)

C:\>
As see i use Python 3.8.
You have install to older version Python 3.6 that also look like it run virtual environment Docker(as it installed a Linux wheel for you).

Install Python 3.8 and follow link over,then test python and pip command work from cmd.
Then if you use VS 2017 there is install setup where you can point to witch Python version(call interpreter) to use.
So in my case over it would be.
C:\python38\python.exe
Also as mention i would advice to use VC Code ,this is not Visual Studio,but own editor much more geared against Python.
VS Code from start
Reply
#5
I have solved a most of part:

C:\>python -V
Python 3.8.5

C:\>python -c "import sys; print(sys.executable)"
C:\Python\python.exe

C:\>pip -V
pip 20.2.3 from c:\python\lib\site-packages\pip (python 3.8)


Now I have to solve to run Python in VS2017 because there is no point to install VS code as long as I already have VS2017. And in this case, I got "Debugging is not supported for Python 2.5 and earlier" ... strange message ...
Reply
#6
Look okay.
Strange that you get that message when try to install VS code.
A option is to remove the 2017 version as it start to get to old now.

If still want to use it look at:
How to create and manage Python environments in Visual Studio
The select you Python 3.8 Path.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Failed attempts to load Microsoft Appstore Python DLLs piyushd 0 394 Oct-31-2023, 10:43 AM
Last Post: piyushd
  ImportError:DLL Load Failed after importing scipy.sparse.linalg sea_jam 0 2,320 Jul-31-2020, 01:54 AM
Last Post: sea_jam
  python import sybpydb error: DLL load failed: The specified module could not be found andieDu 3 7,597 Apr-04-2018, 06:58 AM
Last Post: Larz60+
  Load spatialite in Python 3.6 on Win10 failed RTFirefly 1 5,355 Feb-19-2018, 09:59 PM
Last Post: RTFirefly
  mportError: DLL load failed: jarthda 8 7,968 May-19-2017, 09:59 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020