UserWarning:无法导入可选的_tifffile C扩展模块

问题描述 投票:1回答:1

当我在Ubuntu Pycharm项目中运行这样的代码时

import tifffile
first_image = tifffile.imread("first.tif")

我收到了警告

/home/gradescan/PSTraining/tifffile.py:156: UserWarning: failed to import the 
optional _tifffile C extension module.
Loading of some compressed images will be slow.
Tifffile.c can be obtained at http://www.lfd.uci.edu/~gohlke/
  "failed to import the optional _tifffile C extension module.\n"

如何消除此警告?更好的是,如何将_tifffile C扩展包含到我的PyCharm项目中?

如果这是重复的,请不要关闭,因为搜索标题这是错误消息给了我(和其他人)没有。

python ubuntu pycharm
1个回答
0
投票

https://pypi.org/project/tifffile/下载tifffile

pip install tifffile

python setup_tifffile_c.py build_ext --inplace
© www.soinside.com 2019 - 2024. All rights reserved.