今天,我决定升级我的软件包:
sudo apt-get upgrade
在那之后,我尝试启动我的python2代码,并出现错误:
ImportError: No module named numpy
我尝试了pip install numpy
,但收到了一条消息
Requirement already satisfied: numpy in /home/user/anaconda3/lib/python3.5/site-packages (1.15.1)
pip2 install numpy
产生异常:
pkg_resources.VersionConflict: (pip 18.0 (/usr/local/lib/python3.5/dist-packages), Requirement.parse('pip==8.1.1'))
conda install numpy
产生
# All requested packages already installed.
which python
给了我
/home/user/anaconda3/bin/python
which pip
产生
/home/user/anaconda3/bin/pip
可能是什么问题?似乎无法为python2安装numpy
,因为它已经为python3安装了。我想,conda中的python2 vs python3链接出了什么问题? python,numpy,pip,conda或环境有问题吗?