python - 用户警告:未能导入可选的 _tifffile C 扩展模块
问题描述
当我在 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 项目中?
如果这是重复的,请不要关闭,因为搜索作为错误消息的标题不会给我(和其他人)任何东西。
解决方案
从https://pypi.org/project/tifffile/下载 tifffile
pip install tifffile
python setup_tifffile_c.py build_ext --inplace
推荐阅读
- java - 具有类实例的 Setter 这可能吗?
- android - 更改传递的参数时,Flutter setstate 不会再次调用 build
- matlab - 寻找一个好的 MatLab 函数
- r - R DataTable 解决方案快速重塑
- flutter - 为每个项目构建一个复选框方法
- docker - 最佳实践:如何使用 CI/CD 将 flask webapp 部署到数字海洋?
- node.js - 通过 shell/pyhthon/powershell 脚本将 AzureDevops 提要视图中的 npm 包从 @local 升级到 @pre-release 到 @release?
- python - 如何通过分类从图像中提取信息?
- javascript - 赛普拉斯如何简化我的代码,beforeeach?
- pandas - SQLAlchemy 中的 mssql+pyodbc 出现“数据源名称太长”错误