Python编程错误积累--时常更新

0923-01:模块缺失

ModuleNotFoundError: No module named 'win32api'
因为缺少了windows系统API的库这个模块
使用命令:pip install pypiwin32

0923-02:转义不明

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 139-140: truncated \xXX escape
在路径前面加r,即保持字符原始值的意思
或者,替换为双反斜杠
或者,替换为正斜杠

1008-01:TF的内置问题

AttributeError: 'Tensor' object has no attribute 'numpy'
在import TensorFlow时加一行,tf.enable_eager_execution()

1117-01:依赖冲突

**Failed to load the native TensorFlow runtime**

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
错误:2020年10月之后,安装或更新软件包时可能会遇到错误。这是因为pip将改变它解决依赖冲突的方式。
我们建议您使用--usefeature=2020 resolver在新解析器成为默认值之前测试包。

**在命令后加上--use-feature=2020-resolver**
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值