
python3.7
正在努力学习的zz
这个作者很懒,什么都没留下…
展开
-
ubuntu安装python3.7,并更新python默认指向为python3.7
ubuntu默认带着的python版本不是最新版,因此需要手动安装最新版。查看python的指向。ls -l /usr/bin | grep python可以看到,此时python指向的是python3.4。第一部分:安装python3.71.直接使用apt-get安装python3.7失败:apt-get install python3.72.改为手动安装...原创 2018-12-24 17:57:44 · 210625 阅读 · 66 评论 -
ubuntu安装scrapy报错
pip install scrapy时报错:Could not find a version that satisfies the requirement Twisted>=13.1.0 (from Scrapy) (from versions: ) No matching distribution found for Twisted>=13.1.0 (from Scrapy) ...原创 2018-12-29 17:58:05 · 393 阅读 · 0 评论 -
ubuntu安装python3.7过程中make test命令出错ModuleNotFoundError: No module named ‘_ctypes’
问题1:ModuleNotFoundError: No module named ‘_ctypes’ 解决:1.sudo apt-get update关于sudo apt-get update 出现fetch ppa错误,请移步我的另一篇博客https://blog.youkuaiyun.com/u014775723/article/details/852240262.sudo ap...原创 2018-12-24 17:55:02 · 24038 阅读 · 14 评论 -
ubuntu安装完twisted之后,安装scrapy仍然报错:ModuleNotFoundError: No module named 'twisted.persisted'
报错如图:原因:twisted版本比较低,而python的版本比较高1.查看pip版本2.查看twisted版本pythonimport twistedtwisted.version 因此更新twisted版本 wget https://pypi.python.org/packages/source/T/Twisted/Twisted-17.1.0....原创 2018-12-29 18:50:00 · 1213 阅读 · 0 评论 -
unbuntu pkg_resources.DistributionNotFound: The 'pip==1.5.4' ,排查发现pip不在环境变量中
最开始遇到的问题是:使用pip安装scrapy报错:unbuntu pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application因此参考博客https://blog.youkuaiyun.com/allyli0022/article...原创 2018-12-29 18:53:58 · 2537 阅读 · 0 评论 -
ubuntu关于W: GPG error: http://archive.canonical.com intrepid Release错误
方法1:Try to run the following comamnds from terminal$ sudo -iapt-get cleancd /var/lib/aptmv lists lists.oldmkdir -p lists/partialapt-get cleanapt-get update方法2:Try to run the following ...转载 2018-12-30 16:50:24 · 1568 阅读 · 0 评论 -
centos 解决python3.7 安装时No module named _ssl
转载自:https://www.jianshu.com/p/3ec24f563b81转载 2018-12-30 17:14:56 · 2730 阅读 · 0 评论 -
python3关闭SSL验证
因为网址使用了https,因此关闭验证verify=Falserequest = requests.get(item_url, headers=headers, verify=False)原创 2019-01-15 19:10:52 · 4810 阅读 · 0 评论 -
python 写入数据到文件中
1.写入numpy的向量numpy.save("result", feature_vec_sum)2.读取numpy的向量np.load('result.npy')3.writelines(str)只能写入str因此再次从文件中读取时,也为str若写入【1,2,3,4,5】数组则writelines(str(array))再次读出时,eval(str)即可转为数组...原创 2019-03-12 20:06:10 · 1696 阅读 · 0 评论