解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

作者:林小李 时间:2023-08-29 17:47:32 

Note: 本解决方案在window10 + anaconda3 +pycharm2020.1.1 + scrapy安装亲测可用

问题:安装Scrapy后,执行scrapy出现:

from cryptography.hazmat.bindings._openssl import ffi ImportError: DLL load failed:找不到指定的程序

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

个人认为是Anaconda和Pycharm的部分Python库不能互相调用

即对于某些库,Anaconda存在相同的库,在pycharm安装时不会再安装某些Anaconda中已经存在的Python库,但是pycharm可用检测到系统已存在这些库,但又不能调用Anaconda的一些Python库

(不一定是哪种方法解决了问题)

方法4解决了问题

1. 尝试过的方法:

方法1:把anacond的三个路径都写到环境变量Path,系统本身就是这样,但依然出现相同的问题

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

方法2. 将anaconda promote 中的echo %PATH%的输入结果加到pycharm中的python console中,但依旧没有解决问题

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

方法3:依旧没有解决

(1)pip uninstall scrapy

(2) conda uninstall scrapy

(3) pip install --force --upgrade scrapy

(4)测试:scrapy

方法4:

(1)在pycharm的terminal中卸载scrapy

pip uninstall scrapy

(2)在anaconda prompt中卸载scrapy

conda uninstall scrapy

(3)在pycharm的terminal中安装scrapy

pip install scrapy

(4)如果此时还有些库出现问题,导致找不到程序,则在win10的命令行窗口卸载相应的库,再在pycharm的terminal中安装相应的库

可能存在idna版本过高的问题,

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.
requests 2.25.1 requires idna<3,>=2.5, but you have idna 3.2 which is incompatible.

但是在pycharm的终端中卸载时却提示文件不存在

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

则需要在win10的命令行窗口卸载idna

pip uninstall idna

然后在pycharm的terminal中安装idna

pip install idna==2.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.
twisted 21.2.0 requires Automat>=0.8.0, but you have automat 0.7.0 which is incompatible.

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

另外一些其他库的操作方法相同

例如,存在cryptography却不可调用,是因为cryptography原始安装在anaconda的环境中的

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

因此,在win10的命令行窗口卸载cryptography

pip uninstall cryptography

然后,在pycharm的terminal中安装cryptography

pip install cryptography

执行scrapy提示service_identity模块不存在

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

在pycharm中安装时却提示已经存在

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

则,在win10的命令行窗口卸载service_identity

pip uninstall service_identity

然后,在pycharm的terminal中安装service_identity

pip install service_identity

再次执行scrapy,提示如下,则scrapy安装成功

解决pycharm安装scrapy DLL load failed:找不到指定的程序的问题

来源:https://blog.csdn.net/ikisstherain/article/details/117449457

标签:pycharm,找不到指定的程序,scrapy
0
投稿

猜你喜欢

  • Python轻松破解加密压缩包教程详解

    2021-04-12 13:26:45
  • python切片作为占位符使用实例讲解

    2023-10-13 09:26:50
  • Python实现同时兼容老版和新版Socket协议的一个简单WebSocket服务器

    2023-05-21 10:05:28
  • 元素层叠级别及z-index剖析

    2008-07-22 12:03:00
  • Python完全新手教程

    2021-08-19 18:38:06
  • 深入理解Go语言中的Dispatcher

    2024-02-03 03:27:18
  • 实际应用:MySQL5存储过程编写

    2008-11-11 12:25:00
  • 深入理解Python中的内置常量

    2023-01-21 02:57:47
  • Python常用正则表达式符号浅析

    2022-03-25 08:08:36
  • MySQL8安装Installer版的图文教程

    2024-01-26 04:18:14
  • cordova+vue+webapp使用html5获取地理位置的方法

    2024-04-27 16:00:05
  • Anaconda安装pytorch和paddle的方法步骤

    2021-04-17 18:21:59
  • PL/SQL编程经验小结开发者网络Oracle

    2010-07-18 13:27:00
  • pytorch DistributedDataParallel 多卡训练结果变差的解决方案

    2021-09-24 14:31:43
  • PyCharm+Qt Designer+PyUIC安装配置教程详解

    2024-01-04 12:58:02
  • 关于Pandas count()与values_count()的用法及区别

    2021-09-25 08:28:20
  • python的id()函数解密过程

    2023-03-04 00:17:52
  • python安装scipy的方法步骤

    2022-02-27 21:10:45
  • Windows下ORACLE 10g完全卸载的方法分析

    2012-07-11 16:09:26
  • vue路由history模式页面刷新404解决方法Koa Express

    2024-06-07 15:22:33
  • asp之家 网络编程 m.aspxhome.com