Anaconda 由低版本python 升级到高版本

升级python 3.7 至 python 3.9

$conda create -n Py39 python=3.9
$conda activate Py39
$conda search python=3.9
$conda install -c anaconda python=3.9
$conda update --all
$conda search --full-name python
$conda install python=3.9 anaconda=custom

导入PySide6 模块报错解决

在运行 import PySide6此类的命令时,出现以下报错信息

Found invalid metadata in lib /xxx/anaconda3/plugins/platforms/libqcocoa.dylib: Invalid metadata version
Found invalid metadata in lib /xxx/anaconda3/plugins/platforms/libqminimal.dylib: Invalid metadata version
Found invalid metadata in lib /xxx/anaconda3/plugins/platforms/libqoffscreen.dylib: Invalid metadata version
qt.qpa.plugin: Could not find the Qt platform plugin “cocoa” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

只因为环境配置问题,输入以下命令:

$ python -m venv env
$ source env/bin/activate

可以解决,但是只是在当前命令窗口下可以,在新开启的命令窗口中,需要再次运行上述命令。

Logo

领路信创诚邀您共建高质量内容社区,投稿申请~

更多推荐