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

[Invalid] ImportError: DLL load failed while importing _cascade: 找不到指定的模块 #90

Closed
davidelectricfree opened this issue May 23, 2022 · 30 comments
Labels
fixed BUG 已修复或问题已解决 invalid <过时的问答>或<不可能在最新版代码中遇到的问题>

Comments

@davidelectricfree
Copy link

python main.py claim以后报错,在运行前已经安装依赖并无报错。

Traceback (most recent call last):
File "main.py", line 8, in
from services.scaffold import Scaffold
File "C:\epic-awesome-gamer1\src\services\scaffold.py", line 10, in
from apis.scaffold import get, challenge, install, claimer
File "C:\epic-awesome-gamer1\src\apis\scaffold\get.py", line 16, in
from services.bricklayer import GameClaimer
File "C:\epic-awesome-gamer1\src\services\bricklayer_init_.py", line 6, in
from .game import GameClaimer
File "C:\epic-awesome-gamer1\src\services\bricklayer\game.py", line 11, in
from services.settings import logger, SynergyTunnel
File "C:\epic-awesome-gamer1\src\services\settings.py", line 13, in
from services.utils import ToolBox
File "C:\epic-awesome-gamer1\src\services\utils_init_.py", line 14, in
from .armor.anti_hcaptcha.solutions import sk_recognition
File "C:\epic-awesome-gamer1\src\services\utils\armor\anti_hcaptcha\solutions\sk_recognition.py", line 11, in
from skimage import feature
File "C:\python3.8\lib\site-packages\skimage_shared\lazy.py", line 62, in getattr
return importlib.import_module(f'{package_name}.{name}')
File "C:\python3.8\lib\importlib_init_.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\python3.8\lib\site-packages\skimage\feature_init
.py", line 4, in
from ._cascade import Cascade
ImportError: DLL load failed while importing _cascade: 找不到指定的模块。

@davidelectricfree
Copy link
Author

C:\epic-awesome-gamer1\src>pip list
Package Version


aiocache 0.11.1
aiocqhttp 1.4.2
aiodns 3.0.0
aiofiles 0.8.0
aiohttp 3.8.1
aiosignal 1.2.0
anyio 3.6.1
appdirs 1.4.4
apprise 0.9.8.3
APScheduler 3.9.1
async-generator 1.10
async-timeout 4.0.2
attrs 21.4.0
backports.zoneinfo 0.2.1
beautifulsoup4 4.11.1
blinker 1.4
bs4 0.0.1
CacheControl 0.12.11
cachy 0.3.0
cattrs 1.10.0
cchardet 2.1.7
certifi 2022.5.18.1
cffi 1.15.0
chardet 3.0.4
charset-normalizer 2.0.12
cleo 0.8.1
click 8.1.3
clikit 0.6.2
cloudscraper 1.2.60
colorama 0.4.4
configparser 5.2.0
crashtest 0.3.1
crayons 0.4.0
cryptography 37.0.2
cycler 0.11.0
distlib 0.3.4
filelock 3.7.0
fire 0.4.0
frozenlist 1.3.0
fuzzywuzzy 0.18.0
gevent 21.12.0
greenlet 1.1.2
h11 0.12.0
h2 4.1.0
hpack 4.0.0
html5lib 1.1
httpcore 0.14.7
httpx 0.22.0
hypercorn 0.13.2
hyperframe 6.0.1
idna 2.10
imageio 2.19.2
importlib-metadata 4.11.4
itsdangerous 2.1.2
Jinja2 2.11.3
jmespath 1.0.0
keyring 23.5.0
kiwisolver 1.4.2
langid 1.1.6
lockfile 0.12.2
loguru 0.6.0
lxml 4.8.0
Markdown 3.3.7
MarkupSafe 2.0.1
matplotlib 3.2.2
msgpack 1.0.3
multidict 4.7.6
networkx 2.8.2
nonebot 1.8.0
numpy 1.21.5
oauthlib 3.2.0
opencv-python 4.5.5.64
outcome 1.1.0
packaging 20.9
pastel 0.2.1
peony-twitter 2.1.2
pexpect 4.8.0
Pillow 9.1.1
pip 22.1.1
pkginfo 1.8.2
platformdirs 2.5.2
poetry 1.1.13
poetry-core 1.0.8
priority 2.0.0
ptyprocess 0.7.0
pycares 4.1.2
pycparser 2.21
pygtrie 2.3.3
pylev 1.4.0
pyOpenSSL 22.0.0
pyparsing 3.0.9
PySocks 1.7.1
python-dateutil 2.8.2
python-magic 0.4.25
python-magic-bin 0.4.14
pytz 2022.1
pytz-deprecation-shim 0.1.0.post0
PyWavelets 1.3.0
pywin32-ctypes 0.2.0
PyYAML 6.0
Quart 0.14.1
requests 2.27.1
requests-cache 0.9.4
requests-oauthlib 1.3.1
requests-toolbelt 0.9.1
rfc3986 1.5.0
scikit-image 0.19.2
scipy 1.8.1
selenium 4.1.5
setuptools 49.2.1
shellingham 1.4.0
six 1.16.0
sniffio 1.2.0
sogou-tr-free 0.0.11
sortedcontainers 2.4.0
soupsieve 2.3.2.post1
sqlitedict 2.0.0
tencentcloud-sdk-python 3.0.638
termcolor 1.1.0
tifffile 2022.5.4
tinydb 4.1.1
toml 0.10.2
tomlkit 0.10.2
trio 0.20.0
trio-websocket 0.9.2
tzdata 2022.1
tzlocal 4.2
undetected-chromedriver 3.1.5.post4
url-normalize 1.4.3
urllib3 1.26.9
virtualenv 20.14.1
virtualenv-clone 0.5.7
webdriver-manager 3.5.2
webencodings 0.5.1
websockets 10.3
Werkzeug 1.0.1
win32-setctime 1.1.0
wsproto 0.15.0
XlsxWriter 3.0.3
yarl 1.5.1
zhconv 1.4.3
zipp 3.8.0
zope.event 4.5.0
zope.interface 5.4.0

Python 版本 3.8.6

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

pip uninstall numpy scikit-image -y

pip install numpy==1.21.5 scikit-image>=0.19.2 

@davidelectricfree
Copy link
Author

davidelectricfree commented May 23, 2022

pip install numpy==1.21.5 scikit-image>=0.19.2 

重装大佬说的依赖以后,似乎依然报错

C:\epic-awesome-gamer1\src>pip uninstall numpy scikit-image -y
Found existing installation: numpy 1.21.5
Uninstalling numpy-1.21.5:
Successfully uninstalled numpy-1.21.5
Found existing installation: scikit-image 0.19.2
Uninstalling scikit-image-0.19.2:
Successfully uninstalled scikit-image-0.19.2

C:\epic-awesome-gamer1\src>pip install numpy==1.21.5 scikit-image>=0.19.2

C:\epic-awesome-gamer1\src>python main.py claim
Traceback (most recent call last):
File "main.py", line 8, in
from services.scaffold import Scaffold
File "C:\epic-awesome-gamer1\src\services\scaffold.py", line 10, in
from apis.scaffold import get, challenge, install, claimer
File "C:\epic-awesome-gamer1\src\apis\scaffold\get.py", line 16, in
from services.bricklayer import GameClaimer
File "C:\epic-awesome-gamer1\src\services\bricklayer_init_.py", line 6, in
from .game import GameClaimer
File "C:\epic-awesome-gamer1\src\services\bricklayer\game.py", line 11, in
from services.settings import logger, SynergyTunnel
File "C:\epic-awesome-gamer1\src\services\settings.py", line 13, in
from services.utils import ToolBox
File "C:\epic-awesome-gamer1\src\services\utils_init_.py", line 14, in
from .armor.anti_hcaptcha.solutions import sk_recognition
File "C:\epic-awesome-gamer1\src\services\utils\armor\anti_hcaptcha\solutions\sk_recognition.py", line 11, in
from skimage import feature
File "C:\python3.8\lib\site-packages\skimage_shared\lazy.py", line 62, in getattr
return importlib.import_module(f'{package_name}.{name}')
File "C:\python3.8\lib\importlib_init_.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\python3.8\lib\site-packages\skimage\feature_init
.py", line 4, in
from ._cascade import Cascade
ImportError: DLL load failed while importing _cascade: 找不到指定的模块。

C:\epic-awesome-gamer1\src>

@davidelectricfree
Copy link
Author

pip uninstall numpy scikit-image -y

pip install numpy==1.21.5 scikit-image>=0.19.2 

C:\epic-awesome-gamer1\src>pip list
Package Version


aiocache 0.11.1
aiocqhttp 1.4.2
aiodns 3.0.0
aiofiles 0.8.0
aiohttp 3.8.1
aiosignal 1.2.0
anyio 3.6.1
appdirs 1.4.4
apprise 0.9.8.3
APScheduler 3.9.1
async-generator 1.10
async-timeout 4.0.2
attrs 21.4.0
backports.zoneinfo 0.2.1
beautifulsoup4 4.11.1
blinker 1.4
bs4 0.0.1
CacheControl 0.12.11
cachy 0.3.0
cattrs 1.10.0
cchardet 2.1.7
certifi 2022.5.18.1
cffi 1.15.0
chardet 3.0.4
charset-normalizer 2.0.12
cleo 0.8.1
click 8.1.3
clikit 0.6.2
cloudscraper 1.2.60
colorama 0.4.4
configparser 5.2.0
crashtest 0.3.1
crayons 0.4.0
cryptography 37.0.2
cycler 0.11.0
distlib 0.3.4
filelock 3.7.0
fire 0.4.0
frozenlist 1.3.0
fuzzywuzzy 0.18.0
gevent 21.12.0
greenlet 1.1.2
h11 0.12.0
h2 4.1.0
hpack 4.0.0
html5lib 1.1
httpcore 0.14.7
httpx 0.22.0
hypercorn 0.13.2
hyperframe 6.0.1
idna 2.10
imageio 2.19.2
importlib-metadata 4.11.4
itsdangerous 2.1.2
Jinja2 2.11.3
jmespath 1.0.0
keyring 23.5.0
kiwisolver 1.4.2
langid 1.1.6
lockfile 0.12.2
loguru 0.6.0
lxml 4.8.0
Markdown 3.3.7
MarkupSafe 2.0.1
matplotlib 3.2.2
msgpack 1.0.3
multidict 4.7.6
networkx 2.8.2
nonebot 1.8.0
numpy 1.21.5
oauthlib 3.2.0
opencv-python 4.5.5.64
outcome 1.1.0
packaging 20.9
pastel 0.2.1
peony-twitter 2.1.2
pexpect 4.8.0
Pillow 9.1.1
pip 22.1.1
pkginfo 1.8.2
platformdirs 2.5.2
poetry 1.1.13
poetry-core 1.0.8
priority 2.0.0
ptyprocess 0.7.0
pycares 4.1.2
pycparser 2.21
pygtrie 2.3.3
pylev 1.4.0
pyOpenSSL 22.0.0
pyparsing 3.0.9
PySocks 1.7.1
python-dateutil 2.8.2
python-magic 0.4.25
python-magic-bin 0.4.14
pytz 2022.1
pytz-deprecation-shim 0.1.0.post0
PyWavelets 1.3.0
pywin32-ctypes 0.2.0
PyYAML 6.0
Quart 0.14.1
requests 2.27.1
requests-cache 0.9.4
requests-oauthlib 1.3.1
requests-toolbelt 0.9.1
rfc3986 1.5.0
scikit-image 0.19.2
scipy 1.8.1
selenium 4.1.5
setuptools 49.2.1
shellingham 1.4.0
six 1.16.0
sniffio 1.2.0
sogou-tr-free 0.0.11
sortedcontainers 2.4.0
soupsieve 2.3.2.post1
sqlitedict 2.0.0
tencentcloud-sdk-python 3.0.638
termcolor 1.1.0
tifffile 2022.5.4
tinydb 4.1.1
toml 0.10.2
tomlkit 0.10.2
trio 0.20.0
trio-websocket 0.9.2
tzdata 2022.1
tzlocal 4.2
undetected-chromedriver 3.1.5.post4
url-normalize 1.4.3
urllib3 1.26.9
virtualenv 20.14.1
virtualenv-clone 0.5.7
webdriver-manager 3.5.2
webencodings 0.5.1
websockets 10.3
Werkzeug 1.0.1
win32-setctime 1.1.0
wsproto 0.15.0
XlsxWriter 3.0.3
yarl 1.5.1
zhconv 1.4.3
zipp 3.8.0
zope.event 4.5.0
zope.interface 5.4.0

C:\epic-awesome-gamer1\src>pip

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

你的Python3 开发环境可能有问题,用 Anaconda 之类的工具 build 一个新的吧。

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

或者再试一下 pip uninstall numpy -y && pip uninstall scipy -y && pip install numpy==1.21.5

@davidelectricfree
Copy link
Author

davidelectricfree commented May 23, 2022

或者再试一下 pip uninstall numpy -y && pip uninstall scipy -y && pip install numpy==1.21.5

C:\epic-awesome-gamer1\src>pip uninstall numpy -y && pip uninstall scipy -y && pip install numpy==1.21.5
Found existing installation: numpy 1.21.5
Uninstalling numpy-1.21.5:
Successfully uninstalled numpy-1.21.5
Found existing installation: scipy 1.8.1
Uninstalling scipy-1.8.1:
Successfully uninstalled scipy-1.8.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy==1.21.5
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c8/7a/fc93f1989d009bd1b40d38efc82f1b262deea8842da6435ff90ec86c0ace/numpy-1.21.5-cp38-cp38-win_amd64.whl (14.0 MB)
Installing collected packages: numpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
scikit-image 0.19.2 requires scipy>=1.4.1, which is not installed.
Successfully installed numpy-1.21.5

C:\epic-awesome-gamer1\src>

这次报了一个错

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

能运行了吗

@davidelectricfree
Copy link
Author

pip uninstall numpy -y && pip uninstall scipy -y && pip install numpy==1.21.5

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
scikit-image 0.19.2 requires scipy>=1.4.1, which is not installed.
这个错误要管吗?

@davidelectricfree
Copy link
Author

Uninstalling scipy-1.8.1:

scripy我之前我看装的是1.8.1版本,然后运行卸载

能运行了吗

C:\epic-awesome-gamer1\src>pip uninstall numpy -y && pip uninstall scipy -y && pip install numpy==1.21.5
Found existing installation: numpy 1.21.5
Uninstalling numpy-1.21.5:
Successfully uninstalled numpy-1.21.5
Found existing installation: scipy 1.8.1
Uninstalling scipy-1.8.1:
Successfully uninstalled scipy-1.8.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy==1.21.5
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c8/7a/fc93f1989d009bd1b40d38efc82f1b262deea8842da6435ff90ec86c0ace/numpy-1.21.5-cp38-cp38-win_amd64.whl (14.0 MB)
Installing collected packages: numpy
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
scikit-image 0.19.2 requires scipy>=1.4.1, which is not installed.
Successfully installed numpy-1.21.5

这是完整的日志

@davidelectricfree
Copy link
Author

能运行了吗

只能重新装环境了吗?我的天,每次配环境都要搞半天,昨天刚刚重做的服务器

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

??你服务器是 windows?

@davidelectricfree
Copy link
Author

??你服务器是 windows?

是的,我一直都用的Windows跑你的项目,之前已经跑了好几个月了

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

惊了,你是说你的虚拟机是 Windows 还是....

@davidelectricfree
Copy link
Author

惊了,你是说你的虚拟机是 Windows 还是....

Windows server2019还是2016,腾讯云

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

你是说之前可以运行现在不行了吗😂😂

@davidelectricfree
Copy link
Author

你是说之前可以运行现在不行了吗😂😂

对的,之前可以运行,然后今天最近重做了服务器,然后无法运行

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

这个你要不就用 Anaconda 重新build 一个开发环境吧,我看你的这个Python环境还是裸奔的,非常不安全。然后这个我真没办法给你调服务器了,这并不属于有关项目的问题。或者加一下 TG群组

@QIN2DIM QIN2DIM closed this as completed May 23, 2022
@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

顺便提一嘴,用 Windows server 跑这个项目从来没遇到过BUG 吗?这个项目走到今天陆陆续续遇到了不少的恶性 BUG

@davidelectricfree
Copy link
Author

顺便提一嘴,用 Windows server 跑这个项目从来没遇到过BUG 吗?这个项目走到今天陆陆续续遇到了不少的恶性 BUG

几乎没有,跑得很顺利

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

你自己写了自动更新的脚本吗

@davidelectricfree
Copy link
Author

你自己写了自动更新的脚本吗

对,就是不知道这次怎么突然不好用了,你说的Anaconda 我去了解一下,我Python接触的比较少,谢谢。

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

我感觉可能还是pypi的问题,你把这几个依赖全重装一边看看-=-

numpy,scipy,opencv-python,scikit-image

@davidelectricfree
Copy link
Author

我感觉可能还是pypi的问题,你把这几个依赖全重装一边看看-=-

numpy,scipy,opencv-python,scikit-image

好的,十分感谢,你说的Anaconda 我确实应该了解一下,node.js自带包管理,但是Python这边的pip在遇到这种多版本的项目时感觉局限很大,以前很为这个发愁了很久,就是最近没啥时间,等有时间了把这方面的看看,关于python有什么推荐的书或者网站吗?我之前因为写一些插件在菜鸟教程自学的python,感觉像Anaconda这类东西都不知道。

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

『Blog』Python 应用开发最佳实践@环境搭建篇

pip 严格意义上算是一种包管理工具。 Anaconda 最主要的作用是提供一种非常方便地途径管理 python 虚拟环境。每创建一个虚拟环境都可以初始化一个指定版本的 python解释器,不同的虚拟环境的 pypi 依赖互相隔离。在创建完后的虚拟环境中使用 pip 进行包管理。

@davidelectricfree
Copy link
Author

我感觉可能还是pypi的问题,你把这几个依赖全重装一边看看-=-

numpy,scipy,opencv-python,scikit-image

scikit-image

你说的这几个依赖重装了还是不行

@QIN2DIM
Copy link
Owner

QIN2DIM commented May 23, 2022

我感觉应该不是什么大问题,如果你不想自己折腾的话可以加群向日葵

@davidelectricfree
Copy link
Author

『Blog』Python 应用开发最佳实践@环境搭建篇

pip 严格意义上算是一种包管理工具。 Anaconda 最主要的作用是提供一种非常方便地途径管理 python 虚拟环境。每创建一个虚拟环境都可以初始化一个指定版本的 python编译器,不同的虚拟环境的 pypi 依赖互相隔离。在创建完后的虚拟环境中使用 pip 进行包管理。

好的,谢谢

@davidelectricfree
Copy link
Author

我感觉应该不是什么大问题,如果你不想自己折腾的话可以加群向日葵

这样太麻烦你了,后续我装了虚拟环境再弄吧,因为我服务器本地装了很多插件,你说的这些依赖我之前就有安装,我猜也有可能要么是依赖版本冲突或者是依赖之间哪里有问题。搞一个虚拟环境确实蛮重要的。

后续我弄了虚拟环境,还不行的话,如果你愿意,我再向你请教。十分感谢,这个项目大不了放在我笔记本上跑好了,笔记本上面没装那么多乱七八糟的依赖。

@davidelectricfree
Copy link
Author

davidelectricfree commented May 23, 2022

我感觉应该不是什么大问题,如果你不想自己折腾的话可以加群向日葵

你说的群是电报群还是什么群,如果是大陆这边常用的通讯工具,我还是蛮想加一个的,能向你们多学习学习,如果是电报群可能就没办法了,笑哭,用的确实太少,而且要连上也不是很方便。

@QIN2DIM QIN2DIM added the fixed BUG 已修复或问题已解决 label Jun 1, 2022
@QIN2DIM QIN2DIM changed the title ImportError: DLL load failed while importing _cascade: 找不到指定的模块 [Invalid] ImportError: DLL load failed while importing _cascade: 找不到指定的模块 Jun 1, 2022
@QIN2DIM QIN2DIM added the invalid <过时的问答>或<不可能在最新版代码中遇到的问题> label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed BUG 已修复或问题已解决 invalid <过时的问答>或<不可能在最新版代码中遇到的问题>
Projects
None yet
Development

No branches or pull requests

2 participants