NotImplementedError: cannot instantiate ‘PosixPath‘ on your system报错解决

问题描述

NotImplementedError: cannot instantiate 'PosixPath' on your system

The above exception was the direct cause of the following exception:

解决

在代码的最前面加上

import pathlib
temp = pathlib.PosixPath
pathlib.PosixPath = pathlib.WindowsPath

如果是Linux上报错

import pathlib
pathlib.WindowsPath = pathlib.PosixPath