![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
灵魂只能独行
研究生 人工智能 机器学习 数据挖掘 初学者
展开
-
python 文件锁 portalocker
多进程代码需要对同一个文件写入,需要用到文件锁fcntl。而windows下没有对应的fcntl module。侥幸发现python的lib文件夹下有test/test_fcntl.py文件。导入此文件,使用了fcntl.flock代码可以运行。import test f=open(savefile2, 'a+', newline="", encoding="utf-8") test.fcn...原创 2020-01-18 10:33:42 · 2587 阅读 · 0 评论 -
python 安装指定版本的包 pip命令
使用pip命令安装1.9.1的networkx包,命令如下:pip install networkx==1.9.1原创 2018-07-17 11:53:58 · 18472 阅读 · 0 评论