search

Home  >  Q&A  >  body text

ubuntu python3 sip模块冲突

python3用pip3 install sip安装了4.19最新版,但是import sip加载的依然是4.17的,将sip模块全部卸载掉这个4.17的也卸载不掉,用help(sip)定位到了位置在此:
/usr/lib/python3/dist-packages/sip.cpython-35m-x86_64-linux-gnu.so
请问这个4.17的sip如何删掉,或者是如何更新到4.19?

PHP中文网PHP中文网2812 days ago610

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 10:15:49

    I asked and answered myself again, and it took me a long time to solve the problem. . .
    Install sip in the python3 folder by compiling source files. pip3 install installs it in the python3.5 folder. It will first look for modules in python3. Therefore, no matter how you delete pip3, it will be useless.
    Refer to building the Python3.4 + PyQt5.3.2 + Eric6.0 development platform under Ubuntu 14.04
    So first use sudo rm /usr/lib/python3/dist-packages/sip* to delete the modules under python3, and then re-enter the official website Download sip, compile and install.
    But loading the PyQt5 module in this way will prompt "core dump error", so you need to re-download PyQt5 to compile and install.

    reply
    0
  • Cancelreply