gpt4 book ai didi

python - 如何在Ubuntu 14.0.4上安装ImageHash?

转载 作者:行者123 更新时间:2023-12-01 03:48:38 26 4
gpt4 key购买 nike

我想安装 ImageHash 并且我做到了:

pip install pillow==2.6.1 imagehash==0.3

但我明白:

ImportError: No module named numpy.distutils.core

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ZDGKpH-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scipy
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 235, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)

我应该如何安装它?

最佳答案

要求是 Pillow、numpy 和 scipy。所以我们应该遵循:

对于 numpy/scipy:

sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo pip install scipy

然后:

sudo pip install Pillow
sudo pip install imagehash

关于python - 如何在Ubuntu 14.0.4上安装ImageHash?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38547249/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com