
python的自我修炼
AnneMOMO
这个作者很懒,什么都没留下…
展开
-
FileNotFoundError: [WinError 2] 系统找不到指定的文件
问题描述在将Ubuntu系统下写的代码,转换成Windows系统下写的代码时,遇到这个问题:FileNotFoundError: [WinError 2] 系统找不到指定的文件,如下图所示:解决方案:根据提示找到Anaconda3的lib文件中的subprocess.py文件,查找class Popen(object)模块,再将该模块的__init__函数中的shell=False改成shell=True,这样就可以解决上述问题啦。...原创 2022-03-04 09:24:41 · 619 阅读 · 0 评论 -
python3|出现‘float‘ object cannot be interpreted as an integer的错误
在使用numpy中的np.linspace时,出现TypeError: ‘float’ object cannot be interpreted as an integer的错误,出错代码如下:xx,yy,zz = np.meshgrid(np.linspace(-0.5,0.5,imgs.shape[1]/self.stride), np.linspace(-0.5,0.5,imgs.shape[2]/self.stride),原创 2020-12-10 16:05:13 · 14391 阅读 · 0 评论