import shutil,os
for root1, dir1, files in os.walk(path):#路径下的文件夹以及文件pass
os.makedirs(path)#创建路径文件夹 if(os.path.exists(copyPath)):#判断路径是否存在
shutil.copyfile(copyPath,newPath)#将copyPath路径的文件拷贝到newPath
numpy和torch.tensor数据相互转换总是失败,报错RuntimeError: Numpy is not available,后来发现在import torch的时候就有报错了:UserWarning: Failed to initialize NumPy: No module named 'numpy.core._multia,重装numpy就好了,pip uninstall numpy ,pip install numpy