Python WindowsError: [Error 3]

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_28048569/article/details/80318360

Python WindowsError: [Error 3] The system cannot find the file specified when trying to rename

解决:文件路径没有找到,检查路径是否存在,是否符合要求,是否有空格啥的

可以利用一个判断语句,验证路径是否存在,若不存在,创建文件路径:

path="文件路径"
if not os.path.exists(path):
    os.makedirs(path)

阅读更多

python pip安装包:WindowsError: [Error 123]

04-23

C:\Users\chenlin>python2 -m pip install ManagerrnCollecting Managerrn Using cached Manager-2.0.5.tar.gzrnCollecting Foundations>=2.1.0 (from Manager)rn Using cached Foundations-2.1.0.tar.gzrnException:rnTraceback (most recent call last):rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\basecommand.py", line 209, in mainrn status = self.run(options, args)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\commands\install.py", line 310, in runrn wb.build(autobuilding=True)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\wheel.py", line 748, in buildrn self.requirement_set.prepare_files(self.finder)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\req\req_set.py", line 360, in prepare_filesrn ignore_dependencies=self.ignore_dependencies))rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\req\req_set.py", line 577, in _prepare_filern session=self.session, hashes=hashes)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\download.py", line 810, in unpack_urlrn hashes=hashesrn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\download.py", line 653, in unpack_http_urlrn unpack_file(from_path, location, content_type, link)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\utils\__init__.py", line 605, in unpack_filern untar_file(filename, location)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\utils\__init__.py", line 553, in untar_filern ensure_dir(path)rn File "D:\Python\PythonInstalls\lib\site-packages\pip-8.1.1-py2.7.egg\pip\utils\__init__.py", line 83, in ensure_dirrn os.makedirs(path)rn File "D:\Python\PythonInstalls\lib\os.py", line 157, in makedirsrn mkdir(name, mode)rnWindowsError: [Error 123] : 'c:\\users\\chenlin\\appdata\\local\\temp\\pip-build-v_ax7p\\Foundations\\foundations/tests/testsFoundations/resources/\xe6\xa0\x87\xe5\x87\x86/0\xe7\xba\xa7/1\xe7\xba\xa7'rn请教各位大神这个应给怎么解决?

没有更多推荐了,返回首页