scikit-image fails to install

孤街浪徒 提交于 2019-12-06 08:11:13

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/48226362/scikit-image-fails-to-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!