pyside2 installation problem on ubuntu18.04, python 3.8.3 on anaconda

前端 未结 3 846
刺人心
刺人心 2021-01-22 01:54

After installing anaconda3, I began to install pyside2.

I directly typed pip install pyside2, and successfully installed pyside2 5.15. But when I ran the toy

3条回答
  •  萌比男神i
    2021-01-22 02:03

    I had a similar issue, though I was not using anaconda. The error appears to be a krb5 version mismatch between PySide2 and Ubuntu packages. I was able to resolve the issue by compiling krb5 from source and adding the lib directory to LD_LIBRARY_PATH.

    tar xf krb5-1.18.2.tar.gz
    cd krb5-1.18.2/src
    ./configure --prefix=/opt/krb5/
    make && make install
    
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/krb5/lib
    python -c "import PySide2.QtCore"
    

    The python import no longer raised an error. I found this worked with several different krb5 versions from the offical website; the error seems to be in the Ubuntu modifcations to the package.

    You may have success with uninstalling and reinstalling the Python Qt bindings, as suggested by the other answers, but this did not work for me.

提交回复
热议问题