Ubuntu16.04 自带python2.7.12 和python3.5.2本介绍

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/L_0000/article/details/80710921

Ubuntu16.04 自带python 版本介绍

问题描述:有时明明安装了pip 或numpy等,但在使用时却显示“找不到XXX包”“cannot find XXX”
问题查找:
这里写图片描述

可以看到ubuntu自带python2.7.12和python3.5.2两个版本的python,其中python2.7.12下的pip 是pip,而python3.5.2下的pip是pip3,ubuntu对于这两个版本的包是分开安装和存放的。如果使用pip install XXX,则是安装在python2.7.12环境下的,这时如果需要使用的环境是python3.x则会找不到包。同理,如果使用pip3 install XXX,则是安装在python3.5.2环境下的,这时如果需要使用的环境是python2.x,也会找不到包。
参考CSDN

猜你喜欢

转载自blog.csdn.net/L_0000/article/details/80710921
今日推荐