Python3.6 Can Not Reopen .pyc File With Chinese Path
Solution 1:
This is because Python's default path encoding on Windows is ASCII, not UTF-8, and therefore Chinese symbols are treated as something like D:\Ko&z\Za@e -_~u\:;\clip.cpython-36.pyc
, and the NTFS just cannot find such path and results in WinError, which is overlapped by python: can't reopen .pyc file
in the console window. In fact, you just cannot open .pyc
files in non-ASCII paths.
Workaround
Move your .pyc file into a directory which does NOT contain non-ASCII characters in its pathname, or create a symbolic link, junction point or a hardlink, to reflect your .pyc
file into some other directory. But the most preferred way is to rename your pathname into a pathname without any non-ASCII characters, this will help others understand you in the Stack Overflow community
Post a Comment for "Python3.6 Can Not Reopen .pyc File With Chinese Path"