编程语言
首页 > 编程语言> > python – scikit-image无法安装

python – scikit-image无法安装

作者:互联网

我正在尝试使用python 3.5在我的Windows 7 64位机器上安装scikit-image软件包.安装scikit时,满足要求:

Requirement already satisfied: six>=1.7.3 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from scikit-image)
Requirement already satisfied: networkx>=1.8 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from scikit-image)
Requirement already satisfied: pillow>=2.1.0 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from scikit-image)
Requirement already satisfied: PyWavelets>=0.4.0 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from scikit-image)
Requirement already satisfied: decorator>=4.1.0 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from networkx>=1.8->scikit-image)
Requirement already satisfied: numpy>=1.9.1 in c:\users\x\appdata\local\programs\python\python35\lib\site-packages (from PyWavelets>=0.4.0->scikit-image)

但最终,安装失败了:

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 114: character maps to <undefined>

    ----------------------------------------

  Failed building wheel for scikit-image
Command "C:\Users\X\AppData\Local\Programs\Python\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\X\\AppData\\Local\\Temp\\pycharm-packaging\\scikit-image\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\X\AppData\Local\Temp\pip-3hy8fcuv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\X\AppData\Local\Temp\pycharm-packaging\scikit-image\

我已经尝试过:

pip install -U wheel
pip install -U setuptools
pip install -U scipy

并且还升级了pip本身,没有任何作用.

解决方法:

实际解决方案是在安装命令之前键入chcp 65001.这会将控制台的默认字符编码更改为UTF-8,然后才能工作.

标签:scikit-image,python
来源: https://codeday.me/bug/20190823/1698002.html