ubuntu python3 sip模块冲突
PHP中文网
PHP中文网 2017-04-18 10:13:49
0
1
588

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中文网

认证高级PHP讲师

reply all(1)
左手右手慢动作

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!