在安装jieba==0.39时,pip install jieba==0.39安装报错,错误内容如下所示:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Could not find an activated virtualenv (required).
错误解决过程:
1、根据错误提示:找不到一个已经激活的虚拟环境
2、查看自己的python虚拟环境(我的python是用cnoda安装的python2.7的环境),发现已经进入了python的虚拟环境:
source /usr/local/miniconda3/bin/activate My_Environment
退出虚拟环境,执行同样的命令,也报同样的错误,因此可以判断并不是虚拟环境没有激活而导致的问题。
3、执行如下内容,返回结果为空
echo $PIP_RESPECT_VIRTUALENV
由于自己用conda安装了多个python虚拟环境,并且没有对其进行默认的配置,而安装总是报没有激活虚拟环境,因此将问题定位到python没有配置默认激活的虚拟环境,由于