-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter Notebook crash with "ImportError: DLL load failed: The specified procedure could not be found" #1409
Comments
Can you try importing pywintypes and verifying that |
+1 for this issue I encountered this same problem today after an install into a new virtualenv. There is a healthy amount of comment traffic in this thread discussing sudden kernel errors in jupyter notebook. I am running Windows 10 Version 1903 for x64. |
I can't do much here unless someone is willing to help answer my question above :( |
@mhammond – I’m glad to help. Please review my notes below, and let me know how else I can help. Here is what I found today: Under certain conditions, pywin32==225 causes jupyter notebooks to fail due to One config that causes this error:
More detail
The error was not replicated when:
**Other notes:** In a system without Anaconda, both pywin32==224 and pywin32==225 work correctly. In this case, the path to `pywintypes` is something like: `{path_to_your_sample_project}\\venv\\lib\\site-packages\\pywin32_system32\\pywintypes37.dll'` Systems with Anaconda, have Steps to reproduce:
1- Switch to virtualenv and check which version of pywin32 is installed 2- Check pywintypes path in virtualenv for a project that uses jupyter
RESULT: Jupyter notebook works in this environment when pywin32==225 is installed. Reverting to pywin32==224 also works with Jupyter notebook. ENVIRONMENT 2 – Anaconda installed alongside Python 3- Check another system, this one using venv with Anaconda
4- Activate venv, then Install pywin32==225 5- Check python path 6- Check path of
6- Run jupyter notebook, get kernel error pywin32==225_jupyter_error_traceback.txt.docx RESULT: error due to wrong path for pywin32==225 |
Thanks very much for that info. This isn't a bug in pywin32-225 - pywin32 must use the pywintypesXX.dll that came with the running version, so this problem is going to keep happening forever. If the version in It appears pywin32 ships with Anaconda, and it has been installed in a non-standard way. You really need to talk to them to work out what the supported upgrade process is. |
I've opened an issue in the feedstock pointing to this thread so the relevant maintainer of that can hopefully take action to fix the root issue. |
Since 71afa71, the Python 3.7 has also reached EOL (meaning no security fixes/support) and I'd recommend migrating over to 3.8+ (see #2207) .exe installers are now deprecated #1939, so you should install from PyPI (ie: Given the sheer amount of "ImportError: DLL load failed: The specified module could not be found." issue duplication and old history, I'd like to consolidate the current state of these issues. @JindiXu @surfaceowl Now your error is slightly different, but the history of this thread all happened before the above mentioned fixes. Can you confirm if it still happens with:
If you still do, please also try https://github.com/mhammond/pywin32#troubleshooting and let us know if it did resolve your issue. |
@Avasam -- thanks for checking in from my review - confirming the fix was successful! I do not have the same issue anymore Thanks to you and the team for all the work on this issue, and importantly the updated docs that clearly explain the root cause of the issue and lay out an installation path that avoids the dll conflict. my results in screenshot below meets all conditions:
|
Expected behavior and actual behavior.
Jupyter Notebook crashes when installed under pywin32==225
using python 3.6.8, 32bit, windows 10, install only jupyter==1.0.0
Error:
import win32api
ImportError: DLL load failed: The specified procedure could not be found.
The text was updated successfully, but these errors were encountered: