scikit-image fails to install

2020-07-20 05:12发布

I'm trying to install the scikit-image package on my Windows 7 64-bit machine with python 3.5. While installing scikit, the requirements are met:

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)

But in the end, the installation fails with:

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\

I already tried:

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

and also upgrading pip itself, nothing works.

2条回答
我欲成王,谁敢阻挡
2楼-- · 2020-07-20 05:12

I know now's a bit late(r), but I just had the exact same problem. The solution for me was to install the wheel from here instead.

TBH, I don't know what they do differently, why they work and by whom they are.

Download the correct version there. E.g. for python 3.5 you want the version containing 35. Currently, this is scikit_image‑0.13.1‑cp35‑cp35m‑win32.whl and right below that is the 64 bit version of that.

Install it by running pip install C:\users\you\downloads\the_wheel_you_downloaded.

查看更多
对你真心纯属浪费
3楼-- · 2020-07-20 05:29

Actual solution was to type chcp 65001 before the install command. This changes the default character encoding of the console to UTF-8, then it worked.

查看更多
登录 后发表回答