簡體   English   中英

scikit-image 無法安裝

[英]scikit-image fails to install

我正在嘗試使用 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,然后它就可以工作了。

我知道現在有點晚了(r),但我遇到了完全相同的問題。 我的解決方案是從這里安裝輪子。

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安裝它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM