macOS12.6.6 M1安装wxPython失败:
- imagtiff.cpp:37:14: fatal error: 'tiff.h' file not found
-
下载源文件重新编译(很快,5分钟全部搞定),分三步走:
- pip download wxPython==4.1.1
- tar -zxvf wxPython-4.1.1.tar.gz
-
- cd ./wxPython-4.1.1/ext/wxWidgets/src/common/
- vim imagtiff.cpp
-
修改这4句头文件:
- #include "../tiff/libtiff/tiff.h"
- #include "../tiff/libtiff/tiffio.h"
- //#include "tiff.h"
- //#include "tiffio.h"
-
保存退出,然后
- cd ./wxPython-4.1.1/ext/wxWidgets/src/tiff/libtiff/
- vim tiff.h
-
修改这一句:
- #include "tiffconf.h"
-
保存退出,OK
- cd ./wxPython-4.1.1
- python3 setup.py build
-
- python3 setup.py install
-