scikit-image无法安装

时间:2018-01-12 12:31:41

标签: 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本身,没有任何作用。

2 个答案:

答案 0 :(得分:4)

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

答案 1 :(得分:2)

我知道现在有点迟了(r),但我遇到了同样的问题。我的解决方案是从here安装方向盘。

TBH,我不知道他们做了什么不同的事情,他们为什么工作以及他们是谁。

在那里下载正确的版本。例如。对于python 3.5,您需要包含35的版本。目前,这是scikit_image‑0.13.1‑cp35‑cp35m‑win32.whl,正好是64位版本。

运行pip install C:\users\you\downloads\the_wheel_you_downloaded安装它。