Spyder: ImportError: DLL load failed: The specified procedure could not be found.

Created on 18 Sep 2019  路  3Comments  路  Source: spyder-ide/spyder

Problem Description

There's some problem with my spyder 4.0.0 installation.

What steps reproduce the problem?

  1. I installed Anaconda and updated spyder to 4.0 version
  2. When I run spyder from the shortcut, equivalent to running C:\Anaconda3\pythonw.exe C:\Anaconda3\cwp.py C:\Anaconda3 C:\Anaconda3\pythonw.exe C:\Anaconda3\Scripts\spyder-script.py I get the error posted below.
  3. However, when I run spyder directly from C:\Anaconda3\Scripts\spyder.exe cmd opens with messages:
    Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
    Attribute Qt::AA_UseSoftwareOpenGL must be set before QCoreApplication is created.
    and spyder runs without problems

Paste Traceback/Error Below (if applicable)

The error is:

Traceback (most recent call last):
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\spyder\plugins\ipythonconsole\plugin.py", line 1153, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "C:Anaconda3\libcontextlib.py", line 112, in __enter__
return next(self.gen)
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\jupyter_client\connect.py", line 100, in secure_write
win32_restrict_file_to_user(fname)
File "C:Users\usernameAppData\Roaming\Python\Python37\site鈥憄ackages\jupyter_client\connect.py", line 53, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: The specified procedure could not be found.

```

Versions

  • Spyder version: 4.0.0b
  • Python version: 3.7.3
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Windows 10

cloudpickle >=0.5.0 : 1.2.2 (OK)
pygments >=2.0 : 2.4.2 (OK)
qtconsole >=4.5.5 : 4.5.5 (OK)
nbconvert >=4.0 : 5.6.0 (OK)
sphinx >=0.6.6 : 2.2.0 (OK)
pylint >=0.25 : 2.3.1 (OK)
psutil >=0.3 : 5.6.3 (OK)
qtawesome >=0.5.7 : 0.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
zmq >=17 : 18.1.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
numpydoc >=0.6.0 : 0.9.1 (OK)
spyder_kernels >=1.5.0;<2.0.0: 1.5.0 (OK)
qdarkstyle >=2.7 : 2.7 (OK)
atomicwrites >=1.2.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
watchdog : None (OK)
keyring : None (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pympler : None (OK)
sympy >=0.7.3 : 1.4 (OK)
cython >=0.21 : 0.29.12 (OK)
IPython >=4.0 : 7.8.0 (OK)
matplotlib >=2.0.0 : 3.1.1 (OK)
pandas >=0.13.1 : 0.24.2 (OK)
numpy >=1.7 : 1.16.4 (OK)
scipy >=0.17.0 : 1.2.1 (OK)
pyls >=0.28.2;<0.29.0 : 0.28.3 (OK)
rtree >=0.8.3 : 0.8.3 (OK)

Most helpful comment

I had the same problem when using miniconda. What helped me was updating the pywin32 package (and its dependencies):
conda update pywin32

All 3 comments

Please read our

https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ

If you are unable to fix the problem after that, please install Anaconda instead. Unfortunately, we don't have the resources nor the time to help people with custom installations, so it's up to you to figure this one out.

This is because custom installations are for experts or very knowledgeable people who really know what they are doing and are able to easily solve problems like this.

Eben though you said you're using Anaconda, the file paths in your error message above, like this one:

C:\Users\username\AppData\Roaming\Python\Python37\site鈥憄ackages\spyder\plugins\ipythonconsole\plugin.py

show that you're using another Python installation, or have one installed that it's interfering with Anaconda and you need to remove it.

I had the same problem when using miniconda. What helped me was updating the pywin32 package (and its dependencies):
conda update pywin32

Was this page helpful?
0 / 5 - 0 ratings