conda install xxx时出现 winerror 127找不到指定的程序

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了conda install xxx时出现 winerror 127找不到指定的程序相关的知识,希望对你有一定的参考价值。

参考技术A 现象 :使用anaconda prompt 安装新模块时出现错误——winerror 127找不到指定的程序。

方法 :当Anaconda/DLLS中libssl-1_1-x64.dll 和 anaconda3\Library\bin中的libssl-1_1-x64.dll中的日期不一致时,使用Anaconda/DLLS中libssl-1_1-x64.dll 替换掉 anaconda3\Library\bin中的libssl-1_1-x64.dll。

参考 : https://www.cnblogs.com/pear-linzhu/p/12263929.html

Win10上Python3通过pip install Twisted安装时出现UnicodeDecodeError

pip install Twisted

报错:

C:\Windows\system32>pip install Twisted
Collecting Twisted
  Using cached Twisted-17.9.0.tar.bz2
Requirement already satisfied: zope.interface>=4.0.2 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Twisted)
Requirement already satisfied: constantly>=15.1 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Twisted)
Requirement already satisfied: incremental>=16.10.1 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Twisted)
Requirement already satisfied: Automat>=0.3.0 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Twisted)
Requirement already satisfied: hyperlink>=17.1.1 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Twisted)
Requirement already satisfied: setuptools in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from zope.interface>=4.0.2->Twisted)
Requirement already satisfied: attrs in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Automat>=0.3.0->Twisted)
Requirement already satisfied: six in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from Automat>=0.3.0->Twisted)
Requirement already satisfied: idna>=2.5 in c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages (from hyperlink>=17.1.1->Twisted)
Installing collected packages: Twisted
  Running setup.py install for Twisted ... error
Exception:
Traceback (most recent call last):
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
    return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd5 in position 2: invalid continuation byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
    line = console_to_str(proc.stdout.readline())
  File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
    return s.decode(‘utf-8‘)
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd5 in position 2: invalid continuation byte

解决方案:

打开"c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\pip\compat\__init__.py",定位至75行,修改return s.decode(‘utf-8‘)为return s.decode(‘cp936‘)

原因: 
编码问题,虽然py3统一用utf-8了。但win下的终端显示用的还是gbk编码。

以上是关于conda install xxx时出现 winerror 127找不到指定的程序的主要内容,如果未能解决你的问题,请参考以下文章

导入sklearn时出现conda sklearn错误

Win10上Python3通过pip install Twisted安装时出现UnicodeDecodeError

使用 conda 在 Windows 上构建 Python 包时出现奇怪的“拒绝访问”错误

conda install 出错

conda install 安装慢,或者直接卡死,这么解决

dede程序打开install安装时出现dir