pretty@goodapp:~/codelearning% pip3 install pangu
Requirement already satisfied: pangu in /usr/local/lib/python3.6/site-packages
pretty@goodapp:~/codelearning% python3 /usr/local/bin/custom_ocr.py
Traceback (most recent call last):
File "/usr/local/bin/custom_ocr.py", line 8, in <module>
import pangu
ImportError: No module named 'pangu'
pretty@goodapp:~/codelearning% which python3
/usr/local/bin/python3
到底问题出在哪?mac 下的 python 环境实在太复杂了
macos 内置的是python2 你使用pip3会将pangu装到python3去,因为你没有设置默认使用的是系统的python2运行py文件,所以pangu不存在