Python中 IOError: [Errno 2] No such file or directory的解决方法
2018-01-22 16:41
6016 查看
IOError: [Errno 2] No such file or directory: 'D:\\Users\\daimao\\Desktop\\1.xls'
出现这种情况,首先查看目录是否有错,该目录文件是否存在。
其次在Python中“\”会被自动认为是转义字符,而非目录分隔符,此时修改为'D:\\Users\\daimao\\Desktop\\1.xls'即可。
出现这种情况,首先查看目录是否有错,该目录文件是否存在。
其次在Python中“\”会被自动认为是转义字符,而非目录分隔符,此时修改为'D:\\Users\\daimao\\Desktop\\1.xls'即可。
相关文章推荐
- 使用py2exe 将python文件转成exe文件(以及 error: [Errno 2] No such file or directory: 'MSVCP90.dll'解决方法)
- win10上用Python2.7处理文本,出错IOError: [Errno 2] No such file or directory:如何解决???
- python使用urllib.urlretrieve时出现“IOError:[Errno 2] No such file or directory”解决办法
- mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1解决方法
- python2.7:IOError: [Errno 2] No such file or directory:
- 配置caffe的python环境时make pycaffe提示fatal error: numpy/arrayobject.h No such file or directory解决方法
- Python webdriver 读取本地csv文件中数据 提示:IOError: [Errno 2] No such file or directory
- xcode修改代码目录结构出现clang: error: no such file or directory 解决方法
- xcode修改代码目录结构出现clang:error:nosuchfileordirectory解决方法
- xcode修改代码目录结构出现clang: error: no such file or directory 解决方法
- LINUX 出现ERROR OPENSSLSSL.H NO SUCH FILE OR DIRECTORY的解决方法
- 一种编译错误的解决办法。/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
- BSCMAKE: error BK1506 : : No such file or directory解决方法 -----VS2008
- 解决 Python.h:没有那个文件或目录 错误的方法( Python.h:No such file or directory )
- xcode修改代码目录结构出现clang: error: no such file or directory 解决方法
- fatal error: Python.h: No such file or directory 解决办法
- Mac OS X 编译android内核 error: elf.h: No such file or directory 的解决方法
- Redis 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法
- 【Ubuntu】cannot find -lixxx && fatal error: xxx.h: No such file or directory 解决方法参考
- Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法