冲突 pyinstaller vs pathlib –> 移除 pathlib 导致删除 anaconda 导航器

huangapple go评论218阅读模式
英文:

Conflict pyinstaller vs pathlib --> removing pathlib causes deletion of anaconda navigator

问题

使用pyinstaller将Python文件转换为.exe时,我收到以下错误消息:

"'pathlib'包是标准库包的过时后备,与PyInstaller不兼容。请使用conda remove删除此包,然后再试一次。"

我的Python版本目前为3.10.9
Pyinstaller版本为5.11.0

当我按照建议删除pathlib时,pyinstaller可以正常工作,但我的Anaconda导航器被删除。我总是不得不重新安装它,但再次安装后,pyinstaller又无法工作,因为pathlib被重新安装。
有人面临相同的问题并有解决方案吗?

编辑:我不需要Anaconda导航器来运行pyinstaller应用程序本身,但我希望保留导航器,因为我使用它来打开诸如VS Code、Jupyter等程序,因此由于pathlib和pyinstaller之间的冲突而被删除并不是很方便。

英文:

I get the following error message when using the pyinstaller to convert python file to .exe:

The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package using conda remove then try again.

My python version is currently 3.10.9
Pyinstaller version 5.11.0

When I follow the advice to remove pathlib, pyinstaller works perfectly but my anaconda navigator gets deleted. I always have to re-install it, but then again pyinstaller is not working, because pathlib gets newly installed.
Does someone faces the same issue and has a solution?

Edit: I don't need the anaconda navigator for the pyinstaller application itself, but would like to keep the navigator since I use it to open programs like VS Code, Jupyter etc and its not very convenient that it gets deleted just because of the conflict between pathlib and pyinstaller.

答案1

得分: 0

我找到了解决方法:
而不是使用conda remove pathlib,我手动删除了anaconda3/Lib/site-packages文件夹中pathlib包的文件夹。这样做,不会删除anaconda导航器,只会删除不需要的旧版本的pathlib,然后pyinstaller可以正常工作。

英文:

I found a solution to this problem:
Instead of using conda remove pathlib, I manually deleted the folder for the pathlib package in the anaconda3/Lib/site-packages folder. Doing this, anaconda navigator is not deleted, just the not needed old version of pathlib and pyinstaller works normally.

huangapple
  • 本文由 发表于 2023年6月1日 15:49:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76379740.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定