在用pyinstaller把一個py檔要轉成exe執行檔時,出現下列錯誤
The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in C:\Users\helloeveryone\Anaconda3\lib\site-packages) using conda remove then try again.
這時就執行 pip uninstall pathlib ,把pathlib移除就好,移除後不需要再重裝一次。
之後執行pyinstaller,就可以成功把py轉成exe了。
When using PyInstaller to convert a .py file into an executable (.exe) file, the following error occurs:
"The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in C:\Users\helloeveryone\Anaconda3\lib\site-packages) using conda remove then try again."
To resolve this, execute "pip uninstall pathlib" to remove the pathlib package. After removing it, there is no need to reinstall it.
Afterward, running PyInstaller should successfully convert the .py file into an .exe file.