Noltibus
Noltibus

Reputation: 1360

scikit-image fails to install

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.

Upvotes: 5

Views: 5278

Answers (2)

Noltibus
Noltibus

Reputation: 1360

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.

Upvotes: 6

lucidbrot
lucidbrot

Reputation: 6156

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.

Upvotes: 2

Related Questions