Skip to content
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

ImportError: DLL load failed while importing numpy_ops: The specified module could not be found #2773

Closed
intuitiveit-dev opened this issue Apr 21, 2023 · 15 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation Stale Windows

Comments

@intuitiveit-dev
Copy link

intuitiveit-dev commented Apr 21, 2023

Hi Everyone,

I am getting this error after installing Auto-GPT 0.2.2 on a fresh install of Windows 10 with Python310

Environment
This is running in a VirtualBox VM setup just for AutoGPT so the environment is only set up according to the Auto-GPT install directions
Auto-GPT 0.2.2
Windows 10
Python310

Steps to reproduce
Install Python 3
Download Auto-GPT 0.2.2
pip install -r requirements.txt

Full stack trace:
C:\Auto-GPT-0.2.2>python -m autogpt
Warning: The file 'auto-gpt.json' does not exist. Local memory would not be saved to a file.
Traceback (most recent call last):
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Auto-GPT-0.2.2\autogpt_main
.py", line 5, in
autogpt.cli.main()
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return callback(*args, **kwargs)
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Auto-GPT-0.2.2\autogpt\cli.py", line 77, in main
from autogpt.agent.agent import Agent
File "C:\Auto-GPT-0.2.2\autogpt\agent_init
.py", line 1, in
from autogpt.agent.agent import Agent
File "C:\Auto-GPT-0.2.2\autogpt\agent\agent.py", line 3, in
from autogpt.app import execute_command, get_command
File "C:\Auto-GPT-0.2.2\autogpt\app.py", line 27, in
from autogpt.commands.web_selenium import browse_website
File "C:\Auto-GPT-0.2.2\autogpt\commands\web_selenium.py", line 20, in
import autogpt.processing.text as summary
File "C:\Auto-GPT-0.2.2\autogpt\processing\text.py", line 4, in
import spacy
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\spacy_init
.py", line 6, in
from .errors import setup_default_warnings
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\spacy\errors.py", line 2, in
from .compat import Literal
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\spacy\compat.py", line 38, in
from thinc.api import Optimizer # noqa: F401
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\thinc\api.py", line 2, in
from .initializers import normal_init, uniform_init, glorot_uniform_init, zero_init
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\thinc\initializers.py", line 4, in
from .backends import Ops
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\thinc\backends_init.py", line 8, in
from .cupy_ops import CupyOps
File "C:\Users\AutoGPT\AppData\Local\Programs\Python\Python310\lib\site-packages\thinc\backends\cupy_ops.py", line 4, in
from .numpy_ops import NumpyOps
ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

What I have tried to fix it
The numpy package installed is 1.24.2 and I have tried rolling this back to previous versions 1.14.6 for example
I have also tried the master branch of Auto-GPT and get the same error
I have tried reinstalling all requirements using pip install -r requirements.txt --force-reinstall
And variously uninstalled and reinstalled numpy and spacy

Footnotes
Love the project. New to Python. Any help is appreciated!

@Qoyyuum Qoyyuum added the bug Something isn't working label Apr 21, 2023
@intuitiveit-dev
Copy link
Author

I believe I may have narrowed it down to spacy running on GPU using cuPy which requires a CUDA compatible video driver. I'm running AutoGPT in a VirtualBox VM on an older HP server that doesn't have a CUDA compatible GPU. I don't actually have any NVidia GPUs and only use Intel HD on-board display adapters. My goal was to use my dev box that I use for ASP.NET and React development, and run it in a separate VM in-case Auto-GPT decides to go wild. Is there any way to run Auto-GPT on CPU instead?

References:
https://spacy.io/usage

@Bitcoinlouie
Copy link

Bitcoinlouie commented Apr 21, 2023

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this:
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

@intuitiveit-dev
Copy link
Author

If you are on Windows 11, try installing these. It worked for me on that error. https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Thanks I will give that a try

@intuitiveit-dev
Copy link
Author

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

That was the solution, thank you

@joeyandyou
Copy link

me to

@yong472727322
Copy link

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

thanks, this works for windows 10 too

@ntindle ntindle added documentation Improvements or additions to documentation Windows labels Apr 23, 2023
@AncalagonX
Copy link

Thank you! Auto-GPT used to work fine for me, but about 4 days ago it stopped working. This solution worked for me instantly.

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Thank you! Auto-GPT used to work fine for me on my Windows 10 Hyper-V, but about 4 days ago it stopped working. This solution worked for me instantly.

@will-huiyuan
Copy link

thanks! that's also helpful in Virtual Machine, Win 10, python 3.10.6

@Frehtzio
Copy link

Frehtzio commented Apr 30, 2023

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

yep this was the problem it work for me too ,thanks

@deepjyoti31
Copy link

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

This fixes the issue for me.
Env:
Windows 11 x64
hosted on Azure

@Ric71
Copy link

Ric71 commented May 12, 2023

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

Great! May I ask how you how you found out?

@seancondev
Copy link

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

This worked for me

@Llnski
Copy link

Llnski commented May 24, 2023

I had this error on Windows 11: ImportError: DLL load failed while importing numpy_ops: The specified module could not be found

It was fixed after I installed this: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

This worked for me too, do you know why this fixes the issue?

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

@github-actions github-actions bot added the Stale label Sep 6, 2023
@github-actions
Copy link

This issue was closed automatically because it has been stale for 10 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation Stale Windows
Projects
None yet
Development

No branches or pull requests