python学习笔记

1. pip 安装出错:(好像是安装完一次tensorflow之后pip就不能正常使用了)

Collecting tensorflow
Exception:
Traceback (most recent call last):
  File "D:\software\anaconda\install\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "D:\software\anaconda\install\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
。。。。
TypeError: parse() got an unexpected keyword argument 'transport_encoding'

解决方案:输入命令,会看到一系列更新的结果,然后再次使用pip安装包,发现可以成功安装

conda install -c anaconda html5lib

然而更新过程中出现错误:国内访问速度太慢而引起超时

CondaError: CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/anaconda/win-64/icu-58.2-vc14
hc45fdbb_0.tar.bz2>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

解决方案:输入命令(网上也有说弄镜像的,但是我输入下面命令后就可以正常工作了)

conda install pip  

2.python代码编写中路径格式错误:实际上就是直接把电脑中的路径复制上去了,但是单斜线忘记改成双斜线了。

SyntaxError: (unicode error) 'unicodeescape' codec can't decode byte
  • 4
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值