服务器上我的用户默认的python环境是
/usr/bin/python3.9
但在jupyter中,默认的python是/data/software/anacnoda3/python
或
在jupyter中我import numpy的时候有报错,告诉我当前环境下的numpy包有问题,建议uninstall之后再重新install
于是我到服务器上准备重新安装,但如果我直接
pip uninstall numpy
pip install numpy
肯定解决不了问题,因为这直接操作的是我的默认环境下/usr/bin/python3.9的包
而我应该卸载/data/software/anacnoda3/python的包
执行
/data/software/anaconda3/bin/pip uninstall numpy(可能要sudo权限)
之后
/data/software/anaconda3/bin/pip install numpy
实现了/data/software/anaconda3/bin/python下的numpy包的重装
之后果然解决了问题
之前:
之后: