because your pycharm's project Interpreter have chosen "New enviroment using(Virualenv)" when you created a new project, you should choose "Existing interpreter", then your program can run successfully.
Traceback (most recent call last): File "D:/XXXX/words.py", line 8, in from aip import AipOcr File "C:\Program Files\Python36\lib\site-packages\aip\__init__.py", line 6, in from .ocr import AipOcr File "C:\Program Files\Python36\lib\site-packages\aip\ocr.py", line 12, in from .base import AipBase File "C:\Program Files\Python36\lib\site-packages\aip\base.py", line 14, in requests.packages.urllib3.disable_warnings() AttributeError: module 'pip' has no attribute 'disable_warnings'
我一开始也遇到了这个问题
真是个大坑!! 第一步就折腾半天。 我的解决办法是 版本用2.0.0.0
点赞,完美解决了我的问题
because your pycharm's project Interpreter have chosen "New enviroment using(Virualenv)" when you created a new project, you should choose "Existing interpreter", then your program can run successfully.
先安装关联python3的pip,
sudo apt install python3-pip
再安装baidu-aip,
sudo pip3 install baidu-aip
从百度云官网 人工智能的入口,开通
卸了了重新安装就行了
我也遇到了这个问题 尴尬的是 文件名自己起的aip.py 换了一个OK了
本人安装的是 baidu-aip 2.2.5.0同样报错
Traceback (most recent call last):
File "D:/XXXX/words.py", line 8, in
from aip import AipOcr
File "C:\Program Files\Python36\lib\site-packages\aip\__init__.py", line 6, in
from .ocr import AipOcr
File "C:\Program Files\Python36\lib\site-packages\aip\ocr.py", line 12, in
from .base import AipBase
File "C:\Program Files\Python36\lib\site-packages\aip\base.py", line 14, in
requests.packages.urllib3.disable_warnings()
AttributeError: module 'pip' has no attribute 'disable_warnings'
安装卸载、重新安装都是这样,本人猜测应该是百度aip库的问题
baidu-aip怎么安装啊
两个都需要安装吧
我也是,把baidu-aip和aip两个都卸载,重新安装就行了
我也是,把baidu-aip和aip两个都卸载,重新安装就行了
我也是,把baidu-aip和aip两个都卸载,重新安装就行了
只安装baidu_aip
我也遇到这个问题啦,解决了哈,在这里面之前只有aip,现在同时要安装baidu_aip,
pip install baidu-aip
非常感谢,解决了我的问题!
猜测是只装baidu-aip,不装aip才行,估计是两个冲突了
我一开始也遇到了这个问题,发现是同时有baidu-aip和aip两个,把他们都卸了重新装baidu-aip就行了,不知道你是不是这样情况